How to make Class Module universal
In Excel 2000, for shapes that are controls on a CommandBar,
Application.Caller returns a 2 element array: element 1 is the control that
called the routine, and element 2 is the name of the CommandBar.
For example, if the first button on a CommandBar named "CommandBar Name"
calls the following routine:
Public Sub Test()
Dim varCaller as Variant
varCaller = Application.Caller
End Sub
....then varCaller will be the following:
varCaller(1) = 1
varCaller(2) = "CommandBar Name"
This is true, even if Sub Test is a method inside a class module.
Has this changed in later versions?
--
Regards,
Bill Renaud
|