digitalformula
New Member
- Joined
- Jul 28, 2010
- Messages
- 10
Hi all,
I've got a small class module containing 5 properties, all with Get and Let methods. I can create an instance of the class and assign values to the properties, like this:
Dim currentSite As New Site
currentSite.DateRange = "B9:AF9"
The 'currentSite' variable then needs to be passed to a function so that the function can access the instance properties and act on properties. My function declaration looks like this:
Sub AnalyseRange2(siteData As Site)
When the function is called, I just get this:
Run-time error '438':
Object doesn't support this property or method.
Seems self-explanatory enough but all I'm doing is passing an instance of the class, nothing else. I've tried passing the variable ByRef and ByVal - neither of those make any difference.
Can anyone help solve this?
Thanks!
I've got a small class module containing 5 properties, all with Get and Let methods. I can create an instance of the class and assign values to the properties, like this:
Dim currentSite As New Site
currentSite.DateRange = "B9:AF9"
The 'currentSite' variable then needs to be passed to a function so that the function can access the instance properties and act on properties. My function declaration looks like this:
Sub AnalyseRange2(siteData As Site)
When the function is called, I just get this:
Run-time error '438':
Object doesn't support this property or method.
Seems self-explanatory enough but all I'm doing is passing an instance of the class, nothing else. I've tried passing the variable ByRef and ByVal - neither of those make any difference.
Can anyone help solve this?
Thanks!