+ Reply to Thread
Results 1 to 5 of 5

Switch back to original workbook within macro

  1. #1
    Registered User
    Join Date
    04-11-2012
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2010
    Posts
    76

    Switch back to original workbook within macro

    Hello all,

    Attempting to run a macro from workbook A ("Feedback_View_(Perspective)_2013-03-04-0950.csv") where data from workbook B ("Helper.xlsx") is copied and pasted into a new worksheet named "Helper" in workbook A. Here is my code so far:

    Please Login or Register  to view this content.
    This code works, however I would like it to work for other "destination" files, which will have a different date/time stamp.

    Any help would be much appreciated!

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Switch back to original workbook within macro

    You could change the code so it doesn't need to switch workbooks.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

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

    Re: Switch back to original workbook within macro

    Something like this??

    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

  4. #4
    Registered User
    Join Date
    04-11-2012
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2010
    Posts
    76

    Re: Switch back to original workbook within macro

    Thanks Norie,

    That worked beautifully. As a follow up, if I save this macro in my hidden PERSONAL.XLSB, what adaptation to the macro ought I make such that the new "helper" tab gets created in the workbook that I have open?

  5. #5
    Registered User
    Join Date
    04-11-2012
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2010
    Posts
    76

    Re: Switch back to original workbook within macro

    bump no response

+ 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