Results 1 to 3 of 3
  1. #1
    5 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, PA
    Posts
    855
    Thanks
    140
    Thanked 10 Times in 9 Posts
    I want to put two command buttons on my Excel 2003 worksheet, Each is to run a macro or maybe some VBA code. I can't quite figure out how to do it.

    I've worked a lot with VBA, Command Buttons, etc., but not recently, so I'm rusty. I've also modified a lot of toolbars, but am also rusty.

    Excel Help tells how to put command buttons on a toolbar, but not on the sheet itself. When I use the Toolbox to put the command buttons on the worksheet, I can assign VBA code, but I can't get them to work -- when I click them, they get selected and show their sizing handles. When I put my (simple) code into a macro, I can get the macro to do what I want, but I don't know how to assign it to a button on the worksheet.

    HELP!
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    There are 2 kinds of buttons. If you use one from the Forms toolbar (more stable generally) then you can just right-click and Assign Macro. To use the ones you have from the Control Toolbox, you need to click the Design Mode button on the toolbar again to exit design mode and make them function.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    5 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, PA
    Posts
    855
    Thanks
    140
    Thanked 10 Times in 9 Posts
    The Forms toolbar! THAT's what I've been looking for. Thanks!

    Looking for 'command buttons' in Excel's Help didn't even mention it, at least as far as I could see. Probably it should.
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •