Wrox Programmer Forums
|
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 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 October 18th, 2005, 03:34 AM
Authorized User
 
Join Date: Sep 2003
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default creating toolbars

hi,

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 :

Code:
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?

thanks

Patrick

Visit my site: http://www.drybonesuk.com
__________________
Visit my site: http://www.drybonesuk.com
 
Old October 23rd, 2005, 02:52 AM
Authorized User
 
Join Date: Feb 2005
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I would split up the first line:

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

-Max






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





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