+ Reply to Thread
Results 1 to 3 of 3

Button for macro on toolbar

  1. #1
    Registered User
    Join Date
    07-15-2008
    Location
    germany
    Posts
    56

    Button for macro on toolbar

    Hello experts,

    I have a macro which I want to sent to many people and I want by opening this macro a button is put on toolbar and the button action is assigned to this macro.

    Is this possibe and where i will have to put the code?

    Just suppose this is my code
    PHP Code: 
    sub test()
    msgbox "Test"
    end sub 

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

    Re: Button for macro on toolbar

    This example shows how to add a toolbar to a workbook

    Add_Toolbar.zip
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: Button for macro on toolbar

    Hello,
    Put This one in a regular Module. It may be the one where your macro is or separate module.

    Please Login or Register  to view this content.

    and put this in ThisWorkbook Module

    Please Login or Register  to view this content.
    Last edited by buran; 07-16-2009 at 05:04 AM. Reason: Change in the MyMenu subroutine to allow ScreenUpdating at the end

+ 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