+ Reply to Thread
Results 1 to 2 of 2

Marco and command buttons

  1. #1
    Registered User
    Join Date
    01-07-2006
    Posts
    1

    Unhappy Marco and command buttons

    If I have recorded a macro and saved it as test1 and want to run the macro from a command button, how do I associate the saved macro test1 with the button? Thanks.

  2. #2
    Tom Ogilvy
    Guest

    Re: Marco and command buttons

    put the sheet in design mode by clicking the control toolbox toolbar upper
    left button. Then double click on the command button or right click on it
    and select view code. You will want to see code like

    Private Sub CommandButton1_Click()
    Test1
    End Sub


    or move all the code but the declaration and end statement in the Click
    event.

    --
    Regards,
    Tom Ogilvy

    "sarasotavince" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > If I have recorded a macro and saved it as test1 and want to run the
    > macro from a command button, how do I associate the saved macro test1
    > with the button? Thanks.
    >
    >
    > --
    > sarasotavince
    > ------------------------------------------------------------------------
    > sarasotavince's Profile:

    http://www.excelforum.com/member.php...o&userid=30237
    > View this thread: http://www.excelforum.com/showthread...hreadid=499104
    >




+ 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