Results 1 to 8 of 8

Sorting sheets by calling sub procedures.

Threaded View

  1. #1
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Sorting sheets by calling sub procedures.

    Good day,
    I am just looking to enhance this procedure when sorting. My setting is at the “Page Break Preview”. I feel like the view is much better, I guess to each their own.
    I have sorting procedure stored in my module 3, I have around 6 sorting that will sort different sheets. In some of my codes, I call sometime 3 at a time as my information constantly updates.
    I was looking at my sheet after the procedure was running and it was not doing as the code is written. I am just looking to see if this could be improved or and modified to not have the print selection “Snapped on” when I call these procedures.
    Sort from Sheet1:
    Sub Sort1()
        Application.ScreenUpdating = False
        Application.EnableEvents = False
        With ActiveWorkbook.Worksheets("Pre-Solicitation").Sort
            .SetRange Range("A5:M20")
            .Header = xlNo
            .MatchCase = False
            .Orientation = xlTopToBottom
            .SortMethod = xlPinYin
            .Apply
        End With
        Range("A5").Select
        Application.ScreenUpdating = True
        Application.EnableEvents = True
    End Sub
    The reason I am adding the Range selection at the end is that I havent found how to deselect the full screen. When I call the Sub Proceedure on 2 different Sorts it will generate the first sheet while doing the full proceedure but then if I go to my sheet2 I will see that it did not run the range selection.

    Sheet 2 sub:
    Sub Sort2()
        Application.ScreenUpdating = False
        Application.EnableEvents = False
        With ActiveWorkbook.Worksheets("GETS").Sort
            .SetRange Range("A5:F20")
            .Header = xlNo
            .MatchCase = False
            .Orientation = xlTopToBottom
            .SortMethod = xlPinYin
            .Apply
        End With
        Range("A5").Select
        Application.ScreenUpdating = True
        Application.EnableEvents = True
    End Sub
    Is there a method for the Sheet to do like a unselect all...
    Last edited by Excelnoub; 05-09-2014 at 07:41 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help calling functions to sub procedures
    By xXNetRavenXx in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-27-2010, 01:47 PM
  2. [SOLVED] Calling procedures from within VBA
    By Alex in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-11-2006, 08:50 AM
  3. Event procedures: who is calling?
    By Momo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-22-2006, 03:20 AM
  4. calling procedures from worksheet buttons
    By Anthony in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-23-2005, 07:05 AM
  5. calling procedures (newbie here )
    By Piyush in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-01-2005, 11:21 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