Calling on Methods and Properties within Worksheet Modules
Why is that? I am a strong believer of good programming practice, which
includes avoiding ambiguities whenever possible, which should be nearly 100%
of the time, if not 100% of the time. About the only time I can see when
ambiguity may not be avoided would be dealing with late binding due to other
limitations and the lack of being able to bind at compile time.
--
Thanks,
Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
"Peter T" <peter_t@discussions wrote in message
...
If I follow what you are trying to say, and it's a highly dubious if!
Declare l_wsh As Object ' note not as worksheet
Regards,
Peter T
"Ronald R. Dodge, Jr." wrote in message
...
From within a class modules, is there a viable way to call on a public
method and/or property that is setup within a worksheet module?
I have setup a procedure with the following signatu
Public Sub pcdInitializeWorksheet(ByRef l_objScheduleRangeNames As
clsScheduleRangeNames)
and within the class module that is attempting to call on it, it's setup
as:
l_wsh.pcdInitializeWorksheet m_objScheduleRangeNames
The object variable "l_wsh" is within a For Each...Next loop, which is a
worksheet object.
At the time it's compiling, it's erroring out stating the above method,
"pcdInitializeWorksheet", is not found. If I comment out that one line
of code, everything compiles just fine.
If it's not feasible to use worksheet modules as such, then I will be
left with no choice but to emulate the worksheets.
--
Thanks,
Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
|