-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnumberStation.bas
More file actions
110 lines (83 loc) · 2.98 KB
/
numberStation.bas
File metadata and controls
110 lines (83 loc) · 2.98 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Attribute VB_Name = "numberStation"
Option Explicit
Option Compare Text
Option Base 0
'============================================================================================================================
'
'
' Author : John Greenan
' Email :
' Company : Alignment Systems Limited
' Date : 28th March 2014
'
' Purpose : Matching Engine in Excel VBA for Alignment Systems Limited
'
' References : See VB Module FL for list extracted from VBE
' References :
'============================================================================================================================
Const clngNumerator As Long = 100
Const clngDenominator As Long = 0
Public Sub TestNumbers()
'============================================================================================================================
'
'
' Author : John Greenan
' Email :
' Company : Alignment Systems Limited
' Date : 28th March 2014
'
' Purpose : Matching Engine in Excel VBA for Alignment Systems Limited
'
' References : See VB Module FL for list extracted from VBE
' References :
'============================================================================================================================
Dim lngBrokenAnswer As Long
On Error GoTo ErrHandler
Debug.Print "TestNumbers: Testing error handling"
If 1 = 2 Then
Debug.Print "testing error handling"
Debug.Print "testing error handling"
End If
lngBrokenAnswer = clngNumerator / clngDenominator
If 2 = 1 Then
Debug.Print "testing error handling"
Debug.Print "testing error handling"
End If
Exit Sub
ErrHandler:
Debug.Print "[TestNumbers]Number=" & Err.Number & VBA.vbCrLf & "Description=" & Err.Description
Err.Clear
On Error GoTo 0
End Sub
Public Sub TestNumbers2()
'============================================================================================================================
'
'
' Author : John Greenan
' Email :
' Company : Alignment Systems Limited
' Date : 28th March 2014
'
' Purpose : Matching Engine in Excel VBA for Alignment Systems Limited
'
' References : See VB Module FL for list extracted from VBE
' References :
'============================================================================================================================
Dim lngBrokenAnswer As Long
On Error GoTo ErrHandler
1 Debug.Print "TestNumbers2: Testing error handling"
2 If 1 = 2 Then
3 Debug.Print "testing error handling"
4 Debug.Print "testing error handling"
5 End If
6 lngBrokenAnswer = clngNumerator / clngDenominator
7 If 2 = 1 Then
8 Debug.Print "testing error handling"
9 Debug.Print "testing error handling"
10 End If
Exit Sub
ErrHandler:
Debug.Print "[TestNumbers2]Number=" & Err.Number & VBA.vbCrLf & "Description=" & Err.Description & VBA.vbCrLf & "LineOfCode=" & Erl
Err.Clear
On Error GoTo 0
End Sub