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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export Tables To Excel Spreadsheet

Status
Not open for further replies.

HaydenMB

IS-IT--Management
May 30, 2003
24
GB
Hi,

I am trying to create a new routine that creates a new excel workbook and then copies three tables into three different worksheets in the same workbook.

The only problem is that I cannot change to other worksheets. I have created the code to open and create the workbook and copy the data but I cannot change the worksheet to allow me to copy the other data into it. also is there a way (I know there is) to rename the worksheet?

Many Thanks,
Hayden
[2thumbsup]
 
maybe a look at your code would be nice

DougP, MCP
 
To select another worksheet:

I assume you have a variable WB set to the open book-

WB.sheets("Sheet2").select

hth

Ben

----------------------------------------------
Ben O'Hara

"Where are all the stupid people from...
...And how'd they get so dumb?"
NoFX-The Decline
----------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top