+ Reply to Thread
Results 1 to 3 of 3

Record a macro, activate by button

  1. #1
    Forum Contributor
    Join Date
    10-30-2006
    MS-Off Ver
    O365
    Posts
    311

    Record a macro, activate by button

    Hi everyone,

    Just a quick question.

    I have recorded a macro, all fine. Now i was wondering if i could use a button (which i put on an excel sheet) to run the recorded macro. (rather that 'Ctrl + A' for instance).

  2. #2
    Registered User
    Join Date
    06-06-2007
    Posts
    53
    View > Toolbars > Forms

    Click the "Button" box in the top right corner of the Forms toolbar, then click on the sheet where you want it to appear.

    A window will pop, just select the function you want it to call, and edit/move the box to wherever you'd like it.

  3. #3
    Forum Contributor
    Join Date
    01-10-2006
    Location
    Ahmedabad, India
    MS-Off Ver
    Office 2000
    Posts
    346
    Quote Originally Posted by jimmisavage
    Hi everyone,

    Just a quick question.

    I have recorded a macro, all fine. Now i was wondering if i could use a button (which i put on an excel sheet) to run the recorded macro. (rather that 'Ctrl + A' for instance).
    Have control tool box visible. (View>Toolbars>Control Tool Box ). In the tool box. There is a button. Click on this and then drag and draw a button of required size. If this is the first button its caption would br CommandButton1. Double click on this button. It will directly take you to code sheet of sheet1 ( if you are on sheet1 ). It opens a blank sub named commandbutton1_click which you can edit. Code for your recorded macro would normally be on standard module1 sheet. If name of the macro you recorded is say macro1 then just add a line in the sub and your sub should read
    Please Login or Register  to view this content.
    come back to the excel sheet. On the control tool box click exit design mode. You are ready to go. Clicking the button runs the sub which calls macro1.

    A V Veerkar

+ 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