View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Lenny[_3_] Lenny[_3_] is offline
external usenet poster
 
Posts: 1
Default 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