+ Reply to Thread
Results 1 to 3 of 3

workbook.Sort.SortFields.Add2() method - different behaviors

  1. #1
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    workbook.Sort.SortFields.Add2() method - different behaviors

    folks,

    I have this code:
    Please Login or Register  to view this content.
    LR1 = 342 = last row of data. wsDrawings is a sheet inside a book, also defined to a var named wbDrawings. the code runs just fine for me with no errors. however someone in England, with a different ver of excel (not sure what ver), is getting an error here:
    Please Login or Register  to view this content.
    the error is: object doesn't support this property or method. the MS KB says nothing whatsoever: https://docs.microsoft.com/en-us/off...sortfields.add

    an image of the sheet being sorted is below. anyone run into this before? what should I check?
    Attached Images Attached Images

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,789

    Re: workbook.Sort.SortFields.Add2() method - different behaviors

    You just need to change Add2 to Add

  3. #3
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: workbook.Sort.SortFields.Add2() method - different behaviors

    I ran ADD in place of ADD2 and it worked fine. but then again, that's me. I will see what the person in the UK says. thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Adding columns and other behaviors
    By Mr_Phil in forum Excel General
    Replies: 1
    Last Post: 05-12-2018, 09:10 PM
  2. .Sort.SortFields.Add CustomOrder:=[USE A VARIABLE???]
    By ericbartha in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-22-2016, 12:21 PM
  3. [SOLVED] While, Wends, Ifs and Ors with unexpected behaviors
    By virgincinboy in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-01-2013, 06:35 AM
  4. Using variables in SortFields' Key code problems
    By bob33 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-14-2013, 05:26 PM
  5. Use sort method to sort ranges based on their headings using vba
    By kris nuvio in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-01-2013, 07:54 AM
  6. [SOLVED] Does SortFields have a max of 64 items?
    By GJL65 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-16-2012, 03:09 PM
  7. If formula to look for Letter Patterns or Behaviors
    By trankim in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-26-2012, 12:49 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1