?
Solved

go back to new workbook

Posted on 2013-06-14
1
Medium Priority
?
291 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 52

Accepted Solution

by:
Rgonzo1971 earned 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

719 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