-
Notifications
You must be signed in to change notification settings - Fork 1
/
HistoryEntry.cls
93 lines (70 loc) · 2.74 KB
/
HistoryEntry.cls
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
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "HistoryEntry"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
'This module basically provides a user defined type but in the form of a class
'local variable(s) to hold property value(s)
Private mvarLinkToTimerID As Long 'local copy
Private mvarOnThisDate As String 'local copy
Private mvarRunningTotal As Double 'local copy
Private mvarTotalToday As String 'local copy
Public Function GetKeyValue() As String
GetKeyValue = CStr(mvarLinkToTimerID & Replace(mvarOnThisDate, "/", ""))
End Function
Public Property Let TotalToday(ByVal vData As String)
'used when assigning a value to the property, on the left side of an assignment.
'Syntax: X.TotalToday = 5
mvarTotalToday = vData
End Property
Public Property Get TotalToday() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.TotalToday
TotalToday = mvarTotalToday
End Property
Public Property Let RunningTotal(ByVal vData As Double)
'used when assigning a value to the property, on the left side of an assignment.
'Syntax: X.RunningTotal = 5
mvarRunningTotal = vData
End Property
Public Property Get RunningTotal() As Double
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.RunningTotal
RunningTotal = mvarRunningTotal
End Property
Public Property Let OnThisDate(ByVal vData As String)
'used when assigning a value to the property, on the left side of an assignment.
'Syntax: X.OnThisDate = 5
mvarOnThisDate = vData
End Property
Public Property Get OnThisDate() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.OnThisDate
OnThisDate = mvarOnThisDate
End Property
Public Property Let LinkToTimerID(ByVal vData As Long)
'used when assigning a value to the property, on the left side of an assignment.
'Syntax: X.LinkToTimerID = 5
mvarLinkToTimerID = vData
End Property
Public Property Get LinkToTimerID() As Long
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.LinkToTimerID
LinkToTimerID = mvarLinkToTimerID
End Property
Public Sub CopyAllDataTo(ThisObject As HistoryEntry)
ThisObject.LinkToTimerID = mvarLinkToTimerID
ThisObject.OnThisDate = mvarOnThisDate
ThisObject.RunningTotal = mvarRunningTotal
ThisObject.TotalToday = mvarTotalToday
End Sub