Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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.



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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding Buttons to Worksheet


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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding Buttons to Worksheet


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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding buttons to a new menu bar Greegan Excel Worksheet Functions 1 April 7th 06 07:55 AM
Adding value to option buttons jodieg Excel Discussion (Misc queries) 3 November 29th 05 11:25 PM
Adding ToolTips to buttons Carlos Lozano Excel Programming 2 May 17th 05 03:20 AM
Adding buttons with macros Shatin Excel Programming 0 January 28th 04 04:40 AM
Programmatically adding buttons to a worksheet (Shape Object) Phil Excel Programming 3 January 26th 04 03:51 PM


All times are GMT +1. The time now is 05:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"