Solved

go back to new workbook

Posted on 2013-06-14
1
282 Views
Last Modified: 2013-06-19
I run a macro that open a new workbook. The workbook could open as Book1 or Book2 or Book 3 etc.......

I need [using VBA] to copy from sheet1 of my original file onto Sheet1 of the new workbook, go back to my original workbook Sheet2 the copy the data from that sheet onto Sheet2 on the new workbook.

As the new workbook is not always Book1 etc is this not possible?
0
Comment
Question by:Jagwarman
1 Comment
 
LVL 49

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39247465
Hi,

YOu can use set to refer to the right work book

Set wbkSource = ActiveWorkbook
Set wbkDest = Workbooks.Add(Template:="Workbook")
wbkDest.Activate

Open in new window

0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article will show you how to use shortcut menus in the Access run-time environment.
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question