Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling a procedure with a variable

Status
Not open for further replies.

edkuse

Programmer
Jul 23, 2003
4
US
Is it possible to call a procedure with a variable that is equal to the procedure name?

Example:

Call CommandButton1.Name

'the name is equal to BuildReport

Sub BuildReport()
...
End Sub

This will not work, is at all possible?

Thanks,
edkuse
 
I wonder if you could use the CreateObject function. I have only seen this used with Excel and Word and stuff, but maybe you could use it to create an object from the name in a string. :)
 
Thank you. I think this will definitely help me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top