+ Reply to Thread
Results 1 to 5 of 5

Macro to create a toolbar

  1. #1
    Registered User
    Join Date
    04-02-2010
    Location
    Kentucky
    MS-Off Ver
    Excel 2000
    Posts
    7

    Macro to create a toolbar

    I have a program that I want to distribute to a couple of other users. I have several modules in a workbook that my supervisor feels would help other manangers in our company. I have used this program for years and have made several updates and rewrites. I had to use the record macro feature to create a toolbar with one button. My question is... How can I include in the code the macro to be assigned to that button and rename the macro when you hover over the button. I am including what recording the macro did for me so far. I am using excel 2000

    Application.CommandBars.Add(Name:="ACG Toolbar").Visible = True
    Application.CommandBars("ACG Toolbar").Controls.Add Type:=msoControlButton, ID:=2950, Before:=1

    I want to hover over the button and see the text "MENU" and have the macro "ACGMenu" macro assigned

    Any help would be appreciated

    Thanks

    Rob
    Last edited by justaguyfromky; 03-14-2011 at 05:18 PM.

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,641

    Re: Macro to create a toolbar

    Hi there,

    Try the following code and see if it does what you need. I've added a few extra parameters for you to play with if you feel like experimenting a bit

    Please Login or Register  to view this content.


    I hope this helps - please let me know how you get on.

    Regards,

    Greg M

  3. #3
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Macro to create a toolbar

    or maybe another way ..
    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Macro to create a toolbar

    Which version of Excel? If 2007 or later then Menus are not supported.


    Add_Toolbar.zip

    AddMenu.zip
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Macro to create a toolbar

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1