G
Guest
Hi everyone,
I wrote a Class Module for the Customer object, "clsCustomer". It has the
following methods, each has an argument, "strCustomerID".
Public Function Age(strCustomerID As String) As Integer
Public Function CreditScore(strCustomerID As String) As Integer
Public Function FullAddress(strCustomerID As String, _
Optional strTargetAddress As AddressType = Correspondence) As String
Public Function FullName(strCustomerID As String, _
Optional AddMiddleName As Boolean = True) As String
etc etc .....
Now, isn't that ugly to have to feed each method of the class with the same
argument ?
I can't figure out a way of doing it in one clean stroke, I mean, to provide
the strCustomerID to the class itself at the time of instantiating, and feel
free to use any of its methods (which obviously take the same argument,
amongst other optionals).
Any help is greatly appreciated.
I wrote a Class Module for the Customer object, "clsCustomer". It has the
following methods, each has an argument, "strCustomerID".
Public Function Age(strCustomerID As String) As Integer
Public Function CreditScore(strCustomerID As String) As Integer
Public Function FullAddress(strCustomerID As String, _
Optional strTargetAddress As AddressType = Correspondence) As String
Public Function FullName(strCustomerID As String, _
Optional AddMiddleName As Boolean = True) As String
etc etc .....
Now, isn't that ugly to have to feed each method of the class with the same
argument ?
I can't figure out a way of doing it in one clean stroke, I mean, to provide
the strCustomerID to the class itself at the time of instantiating, and feel
free to use any of its methods (which obviously take the same argument,
amongst other optionals).
Any help is greatly appreciated.