+ Reply to Thread
Results 1 to 2 of 2

Macro to switch to previous workbook, copy data, and go back to original wkb and paste

  1. #1
    Registered User
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    MS Office Professional 2010
    Posts
    30

    Macro to switch to previous workbook, copy data, and go back to original wkb and paste

    Hi,
    I'm trying to figure out a macro to jump from the workbook I am in to another one and copy data, go back to original and paste data. FYI, these workbooks are in two separate sessions of excel and also the workbook that i want it to jump to an copy data from changes each time.

    Below is my code and i have issues when it gets thisworkbook.activate. I need to tell it to go back to the orginal workbook (which is the one that changes each time FYI)


    Please Login or Register  to view this content.
    Last edited by rubenidas; 11-24-2014 at 04:19 PM.

  2. #2
    Forum Contributor
    Join Date
    09-05-2012
    Location
    Dubai
    MS-Off Ver
    Office 365
    Posts
    409

    Re: Macro to switch to previous workbook, copy data, and go back to original wkb and paste

    Hi
    Try assigning this workbook and call ...
    Put below for your current activeworkbook...

    Dim wb1 As Workbook
    Set wb1 = ThisWorkbook

    and try using wb1.Activate

+ 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. Switch back to original workbook within macro
    By theletterh in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-11-2013, 09:40 AM
  2. Macro to Copy Values, Insert Row, Paste in Another, Delete Original Data
    By JimPDX in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-23-2013, 05:35 AM
  3. Getting excel to switch back to a workbook?
    By cuewoz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-25-2009, 05:51 AM
  4. Switch back to previous workbook
    By carterljohn in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-30-2007, 12:01 AM
  5. Replies: 1
    Last Post: 04-01-2006, 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