What is brest way to flit between two spreadsheets

A

Angus Comber

Hello

I have a sheet1.xls and a sheet2.xls - they are both currently open.

If I want to refer to one spreadsheet file I can use
Excel.Workbooks(indexnumber) but can I do the same using a variable filename
string.

For example I want to do something like

A) Refer to sheet1.xls

Worksbooks.Attach strFirstSheet


B) Refer to sheet2.xls
Workbooks.Attach strSecondSheet

How can I do this?

Angus Comber
(e-mail address removed)
 
A

Angus Comber

Sorry for being a berk!

I can use Excel.Workbooks(strFile).activate or whatever

Angus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top