Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel XP error message Run Time Error 91
When executing the following code.
Dim WkbName As String WkbName = Application.CommandBars.ActionControl.Parameter If WkbName = "" Or WkbName = "ThisWorkbook" Then WkbName = ThisWorkbook.Name I get the following error message Run-time error '91': Object variable or With block variable not set COuld someone please help me correct the problem or help me with the syntax |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel XP error message Run Time Error 91
The Parameter property only appears to apply to a specific Control on a
specific Commandbar. Therefore, your code would read something like: WkbName = Application.CommandBars("name".ActionControl("name ').Parameter subtituing the real names where "name" is indicated "Lenny" wrote: When executing the following code. Dim WkbName As String WkbName = Application.CommandBars.ActionControl.Parameter If WkbName = "" Or WkbName = "ThisWorkbook" Then WkbName = ThisWorkbook.Name I get the following error message Run-time error '91': Object variable or With block variable not set COuld someone please help me correct the problem or help me with the syntax |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Run time error message???....Help!! | Excel Discussion (Misc queries) | |||
VBA Error Message "Compile Error...." | Excel Discussion (Misc queries) | |||
How do I get rid of "Compile error in hidden module" error message | Excel Discussion (Misc queries) | |||
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error | Excel Programming | |||
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) | Excel Programming |