+ Reply to Thread
Results 1 to 2 of 2

Code to Select Current Active Sheet

Hybrid View

  1. #1
    Registered User
    Join Date
    07-13-2009
    Location
    North Hollywood
    MS-Off Ver
    Excel 2007
    Posts
    5

    Code to Select Current Active Sheet

    I have a workbook with three worksheets, each named differently (tblQuestionsDC, tblQuestionsRAC, tlbQuestionsATO).

    I need to alter the following string, or a new one, to select whichever worksheet is currently active, may it be tblQuestionsDC, tblQuestionsRAC, or tlbQuestionsATO:

    ActiveWorkbook.Worksheets("tblQuestionsDC").Sort.SortFields.Clear
    Last edited by JosueDG; 10-14-2011 at 04:07 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,102

    Re: Code to Select Current Active Sheet

    ActiveWorkbook.Activesheet.SortFields.Clear
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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