Jul 28th, 2002, 03:17 PM
CallByName for Module Sub/Function
Trying to eliminate a number of select/cases so that I can call the Module Sub/Functions by their Name and pass the applicable parameters.
I have a VB5 work around for VB6 CallByName but it requires an object in the parameter set.
Using a string will not work (e.g. Call strModuleName)
Jul 28th, 2002, 09:33 PM
Syntax for CallByName
You can only invoke methods and properties of the object.
Result = CallByName(Object, ProcedureName, CallType, Arguments())
IF you want this to do more 'regular' routines, then you need to write a class module that does those 'regular' kinds of subroutines.
In other words, move your subs off into a class module. (.CLS)
Jul 29th, 2002, 09:18 AM
Thanks for replying Jim.
Was hoping there was a simple 1 line solution, but moving all of them into a class may be just a simple. Thanks for suggesting it.
Click Here to Expand Forum to Full Width
Survey posted by VBForums.