Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Exporting Info Question 1

Status
Not open for further replies.

SandraF

Programmer
Jan 25, 2001
28
0
0
US
I have the following code in a macro in an excel workbook:

Set wbMaster = ThisWorkbook

Workbooks.Open "E:\DBTest.xls"
Set wbTemp = ActiveWorkbook

For Each ws In Worksheets
Select Case ws.Name

The problem is that when I do the for loop, I want it to look in the wbMAster file, and not the wbTemp file because the MAster file is where I need to first get the data and send it to the wbTemp file. Is there something that I can do to make it so?

THANKS
 
Use the worksheets collection for the master workbook.
Code:
For Each ws In wbMaster.Worksheets
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top