Solved

go back to new workbook

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

Accepted Solution

by:
Rgonzo1971 earned 500 total points
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Outlook Free & Paid Tools
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 how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

763 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now