Ascending and Ascending & FilterBy and SortBy Buttons

  • Hi everyone,

    I am fairly new to Excel VBA but I have covered a lot of ground to understand what is happening although I still run into problems here and there. I however need help with the following:

    I am creating a project that has a userform with both Ascending and Descending buttons. I have tried numerous formulae online but all seem not to be working for me. Is there anyone who has the code for these 2 buttons who can assist me please.

    I also need help with activating my Filterby and SortBy comboboxes that I have created and are appearing in the userform but they are not able to either filter and sort data by the selected column header(s). Eg. Filter by Province and the Sort by District

    Any help rendered will be greatly appreciated!

  • If you want to code a particular sequence of awkward menus, you can use:

    Application.Commandbars.ExecuteMso "PicturesCompress" '20-05-2022 Can add brackets around the speech marks

    If you want to see the complete list of menus you can call up with ...ExecuteMso

    On the down chevron above the Ribbon, select more commands, on the pop up menu , and change the top drop-down menu to all commands, if you find the icon you want to use, you use the phrase in brackets in speech marks using the example code above exactly, but with you brackets text in the speech marks.

    Used this recently for header and footer deletions as could not code any other way.

    I had to use this technique when struggling to compress all images in a document, had to use SendKeys at the end to do the 150ppi compression. (Had to use DoEvents and repeat the SendKeys a my USB numberpad was toggling off or on via odd number of image compressions.

    I have had help from for userforms, a bit of a dark art to me, and can't advise on that method.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!