So I tried following these questions as guides:
- How to use the Implements in Excel VBA
- How to use comparison methods between class object modules in VBA in a similar manner as VB.NET?
Here is the error I'm getting whenever I click a control on my form:
Here is my interface:
ITransactionRecord
Option Compare Database
Option Explicit
Public Property Get TRANSACTION_DATE() As Date
End Property
Here are my classes:
LedgerRecord
Option Compare Database
Option Explicit
Implements ITransactionRecord
'from interface
Private tTRANSACTION_DATE As Date
Private Property Get ITransactionRecord_TRANSACTION_DATE() As Date
ITransactionRecord_TRANSACTION_DATE = TRANSACTION_DATE
End Property
Public Property Get TRANSACTION_DATE() As Date
TRANSACTION_DATE = tTRANSACTION_DATE
End Property
Public Property Let TRANSACTION_DATE(ByVal newTRANSACTION_DATE As Date)
tTRANSACTION_DATE = CDate(Format((newTRANSACTION_DATE), "m / d / yyyy"))
End Property
TransferRecord
Option Compare Database
Option Explicit
Implements ITransactionRecord
'from interface
Private tTRANSACTION_DATE As Date
Private Property Get ITransactionRecord_TRANSACTION_DATE() As Date
ITransactionRecord_TRANSACTION_DATE = TRANSACTION_DATE
End Property
Public Property Get TRANSACTION_DATE() As Date
TRANSACTION_DATE = tTRANSACTION_DATE
End Property
Public Property Let TRANSACTION_DATE(ByVal newTRANSACTION_DATE As Date)
tTRANSACTION_DATE = CDate(Format((newTRANSACTION_DATE), "m / d / yyyy"))
End Property
What am I doing incorrectly?