![]() |
![]() |
|
|||||||
| 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 |
|
New Member
Join Date: Mar 2002
Posts: 28
|
Can someone tell me how I can insert a simple button using VBA that will sort sales figures in ascending order. I have written a simple macro that works but rather than using CTL + S I thought it would look better if there was a command button.
All help gratefully received. Dave |
|
|
|
|
|
#2 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Hi Dave
There are many ways this can be done. But you would probably want it as part of the Workbook only so try this. Right click on any menu item and select "Forms". Then from this toolbar click on the CommandButton, then simply click on your Sheet. The "Macro" dialog will automatically display so just select your macro name and click OK. |
|
|
|
|
|
#3 |
|
New Member
Join Date: Mar 2002
Posts: 28
|
Thanks for that, it worked just how I wanted it. It never ceases to amaze me just how simple this can be when someone can point you in the right direction.
Dave |
|
|
|
|
|
#4 | |
|
New Member
Join Date: Mar 2002
Posts: 4
|
Quote:
It's also amazing how Excel has a Help file that does exactly that. |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|