Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel 2003
The following works within my code:- Call CommandButton10_Click where CB10 is one of many on a Userform and CommandButton10_Click is a subroutine "on" the Userform. The problem comes when I try to make the CommandButton10 part a variable. My code will produce a value for the variable "MyCommandButton" which might be CommandButton15 for example. Then I try to make the call as follows:- Call MyCommandButton(&"_Click") a compile error "Expected Sub, Function or Property" results. Is this just my bad syntax, or am I trying to do something which VBA doesn't like? donwb |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Call a subroutine using variable subroutine name | Excel Discussion (Misc queries) | |||
How To Quit Subroutine from a called subroutine | Excel Programming | |||
Call subroutine from another workbook | Excel Programming | |||
Call Subx for excel 97 Add-In subroutine | Excel Programming | |||
Subroutine call without file reference | Excel Programming |