Consulting

Results 1 to 3 of 3

Thread: VBA that allows sorting of data by user

  1. #1

    VBA that allows sorting of data by user

    I am trying to figure out a macro that will allow users to sort data in ascending or descending order. I have tried the AllowSorting:=True, however that does not seem to work. I do have filters turned on automatically in the spreadsheet. Here is my current code below.

     ws.Protect Password:="Random", UserinterfaceOnly:=True, DrawingObjects:=True, Contents:=True, Scenarios:=True, _
        AllowSorting:=True, AllowFiltering:=True

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    The cells in question must be unlocked.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    What about a macro that allows sorting in the background for example the macro senses that the user wants to sort the data in ascending or descending order so it does it through the macro itself. With my current coding macros will work on all sheets.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •