Wrox Programmer Forums
|
BOOK: Excel 2000/2002 VBA Programmer's Reference
This is the forum to discuss the Wrox book Excel 2000 VBA: Programmers Reference by John Green, Stephen Bullen, Felipe Martins, Brian Johnson; ISBN: 9780764544019
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Excel 2000/2002 VBA Programmer's Reference section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 10th, 2003, 10:26 AM
Registered User
 
Join Date: Jun 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Excel 2000 VBA PR Ch 12 Error

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
 
Old June 28th, 2003, 05:01 AM
Registered User
 
Join Date: Jun 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If your Codes are written in Sheet Module,
you need to point out Object explicitly.

Like,

Set cbWSMenubar = Application.CommandBars("Worksheet Menu Bar")
 
Old January 7th, 2004, 08:22 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 124
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Did that fix the problem?

XUMUSKIEFAN
Wrox Moderator





Similar Threads
Thread Thread Starter Forum Replies Last Post
Beg Access 2000 VBA - Ch 5 - pg 136 - Library? dmrey73 Access VBA 1 January 18th, 2005 05:36 PM
Access 2000 VBA Ch 6 Reports form project Nelz BOOK: Beginning Access VBA 1 September 29th, 2003 09:51 AM
Problem with Excel VBA Chapter 12 RogerWaters Excel VBA 0 September 22nd, 2003 10:13 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.