-
Jul 28th, 2002, 02:17 PM
#1
Thread Starter
PowerPoster
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, 08:33 PM
#2
Frenzied Member
Syntax for CallByName
Code:
Result = CallByName(Object, ProcedureName, CallType, Arguments())
You can only invoke methods and properties of the object.
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, 08:18 AM
#3
Thread Starter
PowerPoster
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.
David
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|