+ Reply to Thread
Results 1 to 3 of 3

Running a Macro from a Command Button

  1. #1
    Registered User
    Join Date
    12-15-2005
    Posts
    7

    Running a Macro from a Command Button

    Hi,

    I've been using excel for a while, but never really used VB. I have recorded a Macro, and all I want to do is put a command button on the sheet to run the Macro, ameteur question I know, but I have no idea how to write the VB Script!!

    Cheers,



    Sam.

  2. #2
    Bob Phillips
    Guest

    Re: Running a Macro from a Command Button

    Invoke the forms toolbar (Tools>Customize and check forms) and there is a
    command button on there that you drag onto the worksheet. As you do, it will
    throw up a dialog asking to assign a macro.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sammy2x" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I've been using excel for a while, but never really used VB. I have
    > recorded a Macro, and all I want to do is put a command button on the
    > sheet to run the Macro, ameteur question I know, but I have no idea how
    > to write the VB Script!!
    >
    > Cheers,
    >
    >
    >
    > Sam.
    >
    >
    > --
    > sammy2x
    > ------------------------------------------------------------------------
    > sammy2x's Profile:

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




  3. #3
    Jim Rech
    Guest

    Re: Running a Macro from a Command Button

    My preference is to use a button from the Forms toolbar rather than the
    Control Toolbox equivalent. If you go that way, after you draw the button
    on a sheet the Assign Macro dialog will appear automatically and all you
    have to do is click on the name of your recorded macro.

    --
    Jim
    "sammy2x" <[email protected]> wrote in
    message news:[email protected]...
    |
    | Hi,
    |
    | I've been using excel for a while, but never really used VB. I have
    | recorded a Macro, and all I want to do is put a command button on the
    | sheet to run the Macro, ameteur question I know, but I have no idea how
    | to write the VB Script!!
    |
    | Cheers,
    |
    |
    |
    | Sam.
    |
    |
    | --
    | sammy2x
    | ------------------------------------------------------------------------
    | sammy2x's Profile:
    http://www.excelforum.com/member.php...o&userid=29674
    | View this thread: http://www.excelforum.com/showthread...hreadid=496922
    |



+ 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