![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
Hello People
I saw some excel spreadsheets, they have the button attached to them. And when they click, it runs the macro or shows the userform if there is one So, I am wondering how do they create the button and how to make it runs? |
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: United Kingdom
Posts: 68
|
Follow this link. It explains how to add a simple "Print Form" button to a spreadsheet
http://www.mrexcel.com/board/viewtop...c=1181&forum=2 Nobby |
|
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
Thanks Nobby
One last question, now in my workbook, I have some worksheets. Is it possible to have my macro and clicking button show and run on all the spreadsheets in the workbook? Thanks again |
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Location: United Kingdom
Posts: 68
|
Set up the Macro, as described. Then you need to add the button to your toolbar rather than within the sheet - this will allow you to use it for any sheet in the workbook.
To add a button to the toolbar, follow this: View/Toolbars/Customise. Select the Commands tab and scroll down until you see Macro, select this. You will now see at least 1 button plus the "Custom Menu Item". Select this Custom item and drag it on to your toolbar. Now right click on the button and change the text to what you want to see. You can also change the look of the button from here. When you've finished close the customise box. Left click on the new button and this will bring up a dialog box showing your list of Macros - just select the one you want to assign to this button. Job done! Nobby |
|
|
|
|
|
#5 |
|
Guest
Posts: n/a
|
That's neat
Thanks alot Nobby |
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|