Solved

go back to new workbook

Posted on 2013-06-14
1
288 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 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

635 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