Can't access to a WorkBook

  • Thread starter Thread starter Jordi
  • Start date Start date
J

Jordi

I Open Excel from Start Menu, then I open again Excel form Start Menu, now I
have two Exels, opened.

I've two workbooks opened, but each one in one different Excel's windows,
how can I work with both by code?

The sentence:

?Workbooks.count

only returns one.
I open one workbook, and then another aplications creates a new workbook, in
the Window menu I only see the current window in each Excel, but I have two
workbooks opened in two Excel.

I'm using Excel 2002.
 
You have created completely separate instances of Excel. To see both
workbooks using one set of code you must open both in the one instance of
Excel. I cannot think why you need two instances of Excel to be running
concurrently, the memory overhead alone makes it very inefficient.

Start Excel and the Open each workbook, you can switch between Windows and
manipulate both (or more) workbooks in one set of code in VBA.

Cheers
Nigel
 
Back
Top