I am having a problem passing a object as a parameter to my AddCreditCardTransaction Sub within my CreditCardBatch class.
In my CreditCardBatch class, I have this sub procedure
Public Sub AddCreditCardTransaction(CreditCardTransaction As clsCreditCardTransaction)
MsgBox (CreditCardTransaction.CustomerName)
End Sub
In a module, I have the following code:
Public Sub test()
Dim obatch As New clsCreditCardBatch
Dim oCC As New clsCreditCardTransaction
obatch.AddCreditCardTransaction (oCC) << I get an error message here
End Sub
I get an error stating that the object doesnt support this property or method.
Any suggestions why I am getting this error. Can I not pass an object to a sub procedure in another class, and use the Credit Card object properties in the CreditCardBatchClass?
In my CreditCardBatch class, I have this sub procedure
Public Sub AddCreditCardTransaction(CreditCardTransaction As clsCreditCardTransaction)
MsgBox (CreditCardTransaction.CustomerName)
End Sub
In a module, I have the following code:
Public Sub test()
Dim obatch As New clsCreditCardBatch
Dim oCC As New clsCreditCardTransaction
obatch.AddCreditCardTransaction (oCC) << I get an error message here
End Sub
I get an error stating that the object doesnt support this property or method.
Any suggestions why I am getting this error. Can I not pass an object to a sub procedure in another class, and use the Credit Card object properties in the CreditCardBatchClass?