+ Reply to Thread
Results 1 to 6 of 6

VBA roadmap of which sheet I came from?

  1. #1
    Registered User
    Join Date
    08-07-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    36

    VBA roadmap of which sheet I came from?

    As I use a macro or VBA to accomplish a procedure, I need to be able to “Capture” which sheet I came from in order to return to that sheet and grab more info.
    How do I track this info? I essentially need the Sheet number “Dropped off” someplace so I can use it later.
    I plan on using

    Please Login or Register  to view this content.

    as the way to get back to the sheet from whence I came, but how do I capture the sheet number of where I came from?

    Thanks!

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VBA roadmap of which sheet I came from?

    Hi Excellentt,

    Please Login or Register  to view this content.
    Then jump out and to return:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    08-07-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: VBA roadmap of which sheet I came from?

    xladept,
    Thank you, that’s awesome.

    Is there a way to do this numerically? Meaning, I have 31 sheets that correspond to days. If I leave from "3" (day 3) to go to a form, could I tell VBA to go back to “3”?

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VBA roadmap of which sheet I came from?

    Hi Excellentt,

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-07-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: VBA roadmap of which sheet I came from?

    Figures that it's that easy!

    Thanks again for the help!!

    ---------- Post added at 04:48 PM ---------- Previous post was at 04:46 PM ----------

    Sorry.....

    How do I know what the sheet number is? Is that the same as Codename?

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VBA roadmap of which sheet I came from?

    Not the same as Codename - but it's the name on the tab!

    Here's the same code as first posted with a twist:

    Please Login or Register  to view this content.

+ 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