Albin
Albin

Reputation: 1120

Open sorting dialog box via VBA in Excel

In Excel (via VBA) I preselect a range and set certain predefined sorting options. Instead of executing the sorting via VBA I want to display the dialog box as it would be when clicking on the sorting button in the ribbon.

This way the user would have the option to check the sorting settings and change them if necessary.

Here's a screen shot of what I mean. I marked the button and the dialog box with a red circle. Ignore the enabled filter, it should work if the filter is disabled as well:
enter image description here

Upvotes: 0

Views: 2195

Answers (1)

JohnyL
JohnyL

Reputation: 7142

Application.CommandBars.ExecuteMso "SortCustomExcel"

Upvotes: 4

Related Questions