|
Subject:
|
Excel 2000 VBA PR Ch 12 Error
|
|
Posted By:
|
Krelek200
|
Post Date:
|
6/10/2003 10:26:55 AM
|
Problem in Chapter 12.
I am trying to add a custom menu that I will later turn into an Add In for our department. I copied the code and get an error in Excel VBA... : Runtime 91 Object Variable or With variable not set ---
This happens after the Dim lines... When you use this
Set cbWSMenubar = CommandBars("Worksheet Menu Bar") <---Right after iHelpIndex = cbWSMenuBar.Controls("Help").Index
Can you help?
Thx Ben
|
|
Reply By:
|
PSKim
|
Reply Date:
|
6/28/2003 5:01:52 AM
|
If your Codes are written in Sheet Module, you need to point out Object explicitly.
Like,
Set cbWSMenubar = Application.CommandBars("Worksheet Menu Bar")
|
|
Reply By:
|
xumuskiefan
|
Reply Date:
|
1/7/2004 7:22:05 PM
|
Did that fix the problem?
XUMUSKIEFAN Wrox Moderator
|