Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 18th, 2005, 03:34 AM
Authorized User
Join Date: Sep 2003
Location: , , United Kingdom.
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default creating toolbars


I would like to create a toolbar with various buttons on it when the project is opened. i keep getting an invalid procedure call or argument error. My code for the toolbars is :

Public Function setToolbars()
    'add toolbar
    CommandBars.Add(Name:="ImpactAnalysis", Temporary:=True).Visible = True
    'add buttons
    CommandBars("ImpactAnalysis").Controls.Add Type:=msoControlButton, ID:=40001, Before:=1, Parameter:="Macro ""DII(F) Migration Schedule v0_2.mpp!submitChanges"""
End Function
then on open, I call this function. can anyone see what I am doing wrong here?



Visit my site: http://www.drybonesuk.com
Visit my site: http://www.drybonesuk.com
Reply With Quote
  #2 (permalink)  
Old October 23rd, 2005, 02:52 AM
Authorized User
Join Date: Feb 2005
Location: , , Netherlands.
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts


I would split up the first line:

CommandBars.Add(Name:="ImpactAnalysis", Temporary:=True)
CommandBars("ImpactAnalysis").Visible = True


Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Report toolbars not showing ching0418 ASP.NET 2.0 Basics 2 July 19th, 2006 10:56 PM
Removing Excel toolbars from within ActiveX DLL maxpotters Excel VBA 1 September 11th, 2005 08:05 AM
Chapter 8 - Toolbars (tech question) RobMeade BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 2 August 10th, 2004 11:40 AM
Page Without Toolbars hugh@kmcnetwork.com ASP.NET 1.0 and 1.1 Professional 1 February 9th, 2004 12:18 PM
Toolbars the_it_guru VB How-To 1 January 19th, 2004 05:41 PM

All times are GMT -4. The time now is 01:27 AM.

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