-
Notifications
You must be signed in to change notification settings - Fork 62
/
ErrorForm.frm
88 lines (77 loc) · 2.45 KB
/
ErrorForm.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
VERSION 5.00
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} ErrorForm
Caption = "Error while running process"
ClientHeight = 1848
ClientLeft = 156
ClientTop = 612
ClientWidth = 10068
OleObjectBlob = "ErrorForm.frx":0000
StartUpPosition = 1 'CenterOwner
End
Attribute VB_Name = "ErrorForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub UserForm_Initialize()
Me.Top = Application.Top + 110
Me.Left = Application.Left + 25
' Me.Height = 180
' Me.Width = 344
' #If Mac Then
' ResizeUserForm Me
' #End If
End Sub
Private Sub UserForm_Activate()
Dim spacing As Long
spacing = 8
Me.Height = 180
Me.Width = 344
Dim LabelCommand As String
Dim ErrorMessage As String
LabelCommand = Me.LabelCommand.Caption
Me.LabelCommand.Caption = vbNullString
ErrorMessage = Me.LabelError.Caption
Me.LabelError.Caption = vbNullString
With Me.LabelError
.AutoSize = True
.WordWrap = True
.Width = 324
Me.LabelError.Caption = ErrorMessage
.AutoSize = False
.Height = .Height + 2
.Width = 324
End With
With Me.LabelCommand
.AutoSize = True
.WordWrap = True
.Width = 252
Me.LabelCommand.Caption = LabelCommand
.AutoSize = False
.Height = .Height + 2
.Width = 252
End With
If Me.LabelError.Caption = vbNullString Then
Me.LabelError.Height = 0
Me.LabelError.Top = 0
End If
Me.LabelLastCommandPrompt.Top = Me.LabelError.Top + Me.LabelError.Height + spacing
Me.LabelCommand.Top = Me.LabelLastCommandPrompt.Top + Me.LabelLastCommandPrompt.Height + spacing / 2
Me.CopyCommandButton.Top = Me.LabelCommand.Top + (Me.LabelCommand.Height - 2) / 2 - Me.CopyCommandButton.Height / 2
Me.CloseErrorButton.Top = Me.LabelCommand.Top + Me.LabelCommand.Height + spacing
Me.Height = Me.CloseErrorButton.Top + Me.CloseErrorButton.Height + spacing + 22
#If Mac Then
ResizeUserForm Me
MacEnableAccelerators Me
#End If
End Sub
Sub CloseErrorButton_Click()
Me.Hide
End Sub
Sub CopyCommandButton_Click()
Clipboard Me.LabelCommand.Caption
End Sub
Private Sub Userform_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then Cancel = True
End Sub