+ Reply to Thread
Results 1 to 3 of 3

go back to CURRENT page after routine

  1. #1
    Forum Contributor
    Join Date
    01-18-2016
    Location
    OBX NC
    MS-Off Ver
    Office 2013
    Posts
    153

    go back to CURRENT page after routine

    I wrote my first routine from tips I learned from here. After a couple of hours getting all good. I am hoping you can assist with what I am trying to do right before the end sub.

    Routine (macro) runs across 2 sheets, all is fine. Routine doesn't select any cells on either page.

    What I need is to have page activated and cell A74 selected, depending on what page the routine is run from.

    For ex. if routine is called from sheet 1 - obviously the cursor is still on sheet1 - I need it to return to sheet 1 a74 else return to sheet2 a74 if routine ran from there..

    Any ideas?


    Thanks guys, you are the best!
    Jack
    Last edited by jackf-nc; 08-04-2016 at 08:55 PM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: go back to CURRENT page after routine

    At the beginning of the macro, write the active sheet's name into a varable, then use that variable to activate the correct sheet at the end of the routine. Like this:

    Please Login or Register  to view this content.
    Let me know if that works for you.

    cheers, teylyn

  3. #3
    Forum Contributor
    Join Date
    01-18-2016
    Location
    OBX NC
    MS-Off Ver
    Office 2013
    Posts
    153

    Re: go back to CURRENT page after routine

    PERFECT Teylyn....Worked beautifully!

+ 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. [SOLVED] Need a small routine to assign range name one cell lower then its current location.
    By pglufkin in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 07-14-2014, 10:10 AM
  2. [SOLVED] Vba code to start page numbers from current page (bottom of the pate right side)
    By satputenandkumar0 in forum Word Formatting & General
    Replies: 2
    Last Post: 04-04-2014, 01:09 AM
  3. Replies: 11
    Last Post: 12-11-2011, 02:27 PM
  4. Current date looking back to sum another column?
    By THORmx in forum Excel General
    Replies: 1
    Last Post: 11-09-2010, 03:23 AM
  5. Call another subroutine when current routine ends
    By ST4RCUTTER in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-11-2007, 07:16 PM
  6. [SOLVED] How to display current page number in any cell of that page.
    By Laljeet in forum Excel General
    Replies: 4
    Last Post: 01-25-2006, 03:55 PM
  7. [SOLVED] get back to day one based on current date
    By oomyoo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-20-2005, 03:50 PM

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