Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I'm having trouble coming up with the exact syntax for an if statement to determine if the following command button exists (so code will be automatically excuted if it does exist): Application.CommandBars(1).Controls("TestCode") Any & all help would be greatly appreciated. mikeburg -- mikeburg ------------------------------------------------------------------------ mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581 View this thread: http://www.excelforum.com/showthread...hreadid=471962 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim cb as Object
On error resume next cb = Application.CommandBars(1).Controls("TextCode") On Error goto 0 if cb is nothing then ' doesn't exist End if -- Regards, Tom Ogilvy "mikeburg" wrote in message ... I'm having trouble coming up with the exact syntax for an if statement to determine if the following command button exists (so code will be automatically excuted if it does exist): Application.CommandBars(1).Controls("TestCode") Any & all help would be greatly appreciated. mikeburg -- mikeburg ------------------------------------------------------------------------ mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581 View this thread: http://www.excelforum.com/showthread...hreadid=471962 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Test if file exists | Excel Discussion (Misc queries) | |||
How to test Worksheet exists before trying to create it? | Excel Programming | |||
How to test if a DLL (library) exists | Excel Programming | |||
Test for Worksheet Exists | Excel Programming | |||
Test if a folder exists | Excel Programming |