+ Reply to Thread
Results 1 to 6 of 6

Adding Buttons to Worksheet

  1. #1

    Adding Buttons to Worksheet

    This is a problem that has vexed me for sometime (I typcially just copy
    buttons out of old worksheets and reassign macros in the newly created
    worksheet), and it is high-time I figure it out. How does one create a
    button in an excel worksheet? I have tried the UserForm route with no
    success, and I am sure there is something simple here that I am just
    not catching. Needless to say I am very frustrated with this, and any
    help is most appreciated.


  2. #2
    Dave Peterson
    Guest

    Re: Adding Buttons to Worksheet

    Manually???

    There are two buttons that look alike, but behave differently.

    One is on the Forms toolbar. The other is on the Control toolbox toolbar.

    In either case, just show that toolbar.
    click on the button you like
    back to the worksheet and click to anchor a corner. Then drag to the opposite
    corner.

    If you chose to use the Forms button, you'll be prompted for a macro name to
    assign to this button. (You can dismiss that dialog and assign it later if you
    want).

    If you chose the control toolbox toolbar commandbutton, you can double click on
    that button and put your code in that _click event.

    And you know that you can use objects from the Drawing toolbar (as well as other
    controls from the Forms toolbar) and assign macros to them, too.



    [email protected] wrote:
    >
    > This is a problem that has vexed me for sometime (I typcially just copy
    > buttons out of old worksheets and reassign macros in the newly created
    > worksheet), and it is high-time I figure it out. How does one create a
    > button in an excel worksheet? I have tried the UserForm route with no
    > success, and I am sure there is something simple here that I am just
    > not catching. Needless to say I am very frustrated with this, and any
    > help is most appreciated.


    --

    Dave Peterson

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Paul,

    There are 2 ways to create buttons and other objects on an Excel worksheet. First is by using the Forms Toolbar. Click on View on the Excel Menu Bar and select Toolbars. If the Forms Toolbar is visible it will a check mark beside it. Clicking it will switch the toolbar's visible state. These control have the advantage of being easy to use, especially with recorded macros. The down side is they aren't very robust.

    The second type are the Control ToolBox objects which are part of VBA. You can access these from the VBA Toolbar. You can check if it visible just like I stated above. The provide you with features and flexibility, but are far more complex to program. To see the controls available click on the wrench and hammer icon.

    Once you have the toolbar displayed, you can select which control you want to place on the worksheet. Click on the object, place the cursor where you want to draw the control and left click and hold while you move the mouse. You can control the size as you move. You can always resize a control after you draw it.

    That's the basics. It should get you started on your way.

    Sincerely,
    Leith Ross

  4. #4
    Dave Peterson
    Guest

    Re: Adding Buttons to Worksheet

    Just curious why you say the controls from the Forms toolbar aren't very
    robust. They're not as "feature rich" like the controls from the control
    toolbox toolbar (like you said), but I've found them to be very robust.

    In fact, I've had fewer problems with the Forms controls than the control
    toolbox controls.



    Leith Ross wrote:
    >
    > Hello Paul,
    >
    > There are 2 ways to create buttons and other objects on an Excel
    > worksheet. First is by using the Forms Toolbar. Click on View on the
    > Excel Menu Bar and select Toolbars. If the Forms Toolbar is visible it
    > will a check mark beside it. Clicking it will switch the toolbar's
    > visible state. These control have the advantage of being easy to use,
    > especially with recorded macros. The down side is they aren't very
    > robust.
    >
    > The second type are the Control ToolBox objects which are part of VBA.
    > You can access these from the VBA Toolbar. You can check if it visible
    > just like I stated above. The provide you with features and
    > flexibility, but are far more complex to program. To see the controls
    > available click on the wrench and hammer icon.
    >
    > Once you have the toolbar displayed, you can select which control you
    > want to place on the worksheet. Click on the object, place the cursor
    > where you want to draw the control and left click and hold while you
    > move the mouse. You can control the size as you move. You can always
    > resize a control after you draw it.
    >
    > That's the basics. It should get you started on your way.
    >
    > Sincerely,
    > Leith Ross
    >
    > --
    > Leith Ross
    > ------------------------------------------------------------------------
    > Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
    > View this thread: http://www.excelforum.com/showthread...hreadid=478400


    --

    Dave Peterson

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Dave,

    This was one of those times when the right word eluded me. "Robust" really wasn't the best word or phrase to use, but I couldn't think of anything else at the moment. "Feature rich" sums it up perfectly. Thank you.

    Sincerely,
    Leith Ross

  6. #6
    Dave Peterson
    Guest

    Re: Adding Buttons to Worksheet

    Then we are in violent agreement <vbg>.

    Leith Ross wrote:
    >
    > Hello Dave,
    >
    > This was one of those times when the right word eluded me. "Robust"
    > really wasn't the best word or phrase to use, but I couldn't think of
    > anything else at the moment. "Feature rich" sums it up perfectly. Thank
    > you.
    >
    > Sincerely,
    > Leith Ross
    >
    > --
    > Leith Ross
    > ------------------------------------------------------------------------
    > Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
    > View this thread: http://www.excelforum.com/showthread...hreadid=478400


    --

    Dave Peterson

+ 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