+ Reply to Thread
Results 1 to 4 of 4

Identify active worksheet in macro

  1. #1
    Registered User
    Join Date
    03-12-2007
    Posts
    61

    Identify active worksheet in macro

    Hi,

    Currently I have 10 tabs in an Excel spreadhsheet - each one is a pivot report. I created one macro to format all 10 reports at one time.. so if anyone filters or drills down on the pivot reports, they can reset the print formatting with this macro.

    However, the macro always lands the user back at the first tab.

    For example, if someone is on tab 4 and runs the macro, the macro does its
    thing and then lands the person on tab 1... not tab 4.

    Is there a way to tell in the macro to land back on the worksheet tab the user started on in the first place?

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Before executing any of your formatting, try something like:
    Please Login or Register  to view this content.
    Then, after the procedure is ran, at the end, include:
    Please Login or Register  to view this content.
    HTH

    Jason

  3. #3
    Registered User
    Join Date
    03-12-2007
    Posts
    61
    Excellent! Works great. Thank you very much.

  4. #4
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    No problem. Glad to help.

+ 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