Results 1 to 3 of 3

Time Limit on information sort

Threaded View

JamesT1 Time Limit on information sort 09-14-2008, 05:54 AM
Richard Buttrey Hi, One way with the... 09-14-2008, 07:23 AM
JamesT1 Richard works a treat,... 09-14-2008, 08:20 AM
  1. #1
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    430

    Time Limit on information sort

    Hi

    I have a list of current staff with a button using a basic macro to sort the list into alphabetical order.

    Is there a way to stop the macro activatiing after a certain date/day.

    e.g. Week runs Monday to Saturday, The 1st week of the year starts on 1st Monday in April the information can be sorted during the week, after the Saturday the button would have no effect

    Sub Sort_drivers()
    '
    ' Sort_drivers Macro
    ' Macro recorded 29/06/2008 by Jim
    '
    
    '
        ActiveWindow.SmallScroll Down:=-8
        Range("A8:K157").Select
        Selection.Sort Key1:=Range("C8"), Order1:=xlAscending, Key2:=Range("B8") _
            , Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
            False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2 _
            :=xlSortNormal
        Range("A159:K178").Select
        Selection.Sort Key1:=Range("C159"), Order1:=xlAscending, Key2:=Range( _
            "B159"), Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase _
            :=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, _
            DataOption2:=xlSortNormal
        ActiveWindow.SmallScroll Down:=-194
        Range("M27").Select
    End Sub
    Thank you
    Last edited by JamesT1; 09-14-2008 at 06:07 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. sort error
    By dlh in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-11-2008, 05:42 PM
  2. can't subtract one time from another
    By Dan2658 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-03-2008, 09:09 AM
  3. total time
    By telcotech in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-02-2008, 10:44 PM
  4. time in time out no idea how to calculate
    By noprusack in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-15-2007, 02:18 PM
  5. Assignment overDUE PLEASE PLEASE HELP!!
    By undergrad in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-29-2006, 12:34 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