+ Reply to Thread
Results 1 to 2 of 2

Using code from custom menu bar to a Command button

  1. #1
    Alex Martinez
    Guest

    Using code from custom menu bar to a Command button


    Hi,

    I am using Excel 2002 and I want to imporove upon a co-workers workbook.
    The particutlar workbook that I am working is called "Reviewers", which has
    a custom menu bar call "Cust Menu" when you press the menu bar button it
    activates a copy and paste command based on a seperate macro file called
    "Transfer". The "Transfer" file opens up when the "Cust Menu" button is
    pressed, not a problem it works fine, but now I want to have a separate
    command button on the worksheet that will do the same copy and paste command
    as in the "Cust Menu" I know how to create a command button I don't want to
    create a separte macro, in case I need to change the orginal macro in the
    "Cust Menu" bar. What I want is to have the command button to open up the
    "Transfer" macro file and get access to the code in the "Cust Menu" button..
    How do I do this? Any tips will be appreciated. Thank you in advance.




  2. #2
    Mike Fogleman
    Guest

    Re: Using code from custom menu bar to a Command button

    Just assign the same macro to your button. The same macro can be assigned to
    any number of controls.

    Mike F
    "Alex Martinez" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hi,
    >
    > I am using Excel 2002 and I want to imporove upon a co-workers workbook.
    > The particutlar workbook that I am working is called "Reviewers", which
    > has a custom menu bar call "Cust Menu" when you press the menu bar button
    > it activates a copy and paste command based on a seperate macro file
    > called "Transfer". The "Transfer" file opens up when the "Cust Menu"
    > button is pressed, not a problem it works fine, but now I want to have a
    > separate command button on the worksheet that will do the same copy and
    > paste command as in the "Cust Menu" I know how to create a command button
    > I don't want to create a separte macro, in case I need to change the
    > orginal macro in the "Cust Menu" bar. What I want is to have the command
    > button to open up the "Transfer" macro file and get access to the code in
    > the "Cust Menu" button.. How do I do this? Any tips will be appreciated.
    > Thank you in advance.
    >
    >




+ 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