Sort order Descending and Ascending

Tcurtis

Board Regular
Joined
Aug 15, 2009
Messages
149
Hi, I have a form that my user wants to sort by ascending and descding order. They would like to click on the field title in the header of the form and switch from descending to ascending and back again. Is that a way to do this with VBA? I am very new to VBA and do not have a good grasp on it.
Thanks
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
It might be possible, but better just show them how to right-click in the field and choose sort from the right click menu. This has the advantage of 1) already being done for you and 2) the user can do this with almost any form, query or table so they get to learn to fish rather than just getting a fish.
 
Upvote 0
Thanks. This is what the user is asking for. The user is asking to be able to sort by descending or ascending order with the click of the header label. They have also asked for the ability to filter by a couple of fields.
 
Upvote 0

Forum statistics

Threads
1,216,057
Messages
6,128,527
Members
449,456
Latest member
SammMcCandless

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