Sort button

daveray

New Member
Joined
Mar 3, 2002
Messages
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
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
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.
 
Upvote 0
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
 
Upvote 0
On 2002-03-17 03:50, daveray wrote:
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


It's also amazing how Excel has a Help file that does exactly that.
 
Upvote 0

Forum statistics

Threads
1,213,510
Messages
6,114,044
Members
448,543
Latest member
MartinLarkin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top