+ Reply to Thread
Results 1 to 6 of 6

How to make Sort Macro work referencing Table

  1. #1
    Registered User
    Join Date
    03-01-2017
    Location
    Oslo, Norway
    MS-Off Ver
    2016
    Posts
    3

    How to make Sort Macro work referencing Table

    Hi,
    What's wrong with my code?

    Please Login or Register  to view this content.
    Last edited by eybjerke; 03-01-2017 at 07:18 AM. Reason: Typo in code box (SortRows1→SortRows)

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: How to make Sort Macro work referencing Table

    Hi,

    Your Sort routine calls SortRows- not SortRows1- which is not posted, so hard to comment on.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    03-01-2017
    Location
    Oslo, Norway
    MS-Off Ver
    2016
    Posts
    3

    Re: How to make Sort Macro work referencing Table

    Quote Originally Posted by xlnitwit View Post
    Hi,

    Your Sort routine calls SortRows- not SortRows1- which is not posted, so hard to comment on.
    Just a typo in the thread. It's not the problem.

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: How to make Sort Macro work referencing Table

    Then perhaps you might tell us what is the problem. What happens with your code?

  5. #5
    Registered User
    Join Date
    03-01-2017
    Location
    Oslo, Norway
    MS-Off Ver
    2016
    Posts
    3

    Re: How to make Sort Macro work referencing Table

    Quote Originally Posted by xlnitwit View Post
    Then perhaps you might tell us what is the problem. What happens with your code?
    Runtime Error '424': Object Required

    Fails at this line:
    If Not Intersect(Target, Range("TAB[[#All],[In Service Date]]")) Is Nothing Then

    It works with Range (below), but fails when trying to reference Table.

    Please Login or Register  to view this content.

  6. #6
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: How to make Sort Macro work referencing Table

    What is Target supposed to be in that code? It isn't declared or set anywhere.

+ 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. Is it possible to make a macro to work on a PDF?
    By zookeepertx in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-01-2014, 06:05 PM
  2. Sort in Macro without referencing specific sheet
    By Ellie1326 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-22-2013, 09:01 AM
  3. [SOLVED] How to make the macro work for all rows in the work sheet
    By Valli nayaki in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-18-2013, 10:43 PM
  4. to make a pivot table to work with an adjoining table
    By byronova in forum Excel General
    Replies: 2
    Last Post: 09-06-2009, 10:47 AM
  5. Can't make this Macro work!
    By Luminary Xion in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-03-2009, 10:15 PM
  6. one formula to make a multiplication table work
    By Paige in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-14-2005, 03:05 PM
  7. [SOLVED] Relative referencing in macro won't work
    By topraka@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-02-2005, 10:06 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