Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
I can't see a Workbook in WorkBooks.Count
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
I can't see a Workbook in WorkBooks.Count
Jordi,
If Workbooks.Count returns 1, then you have only 1 workbook open, with mutliple windows of that one workbook. Try using Debug.Print ActiveWorkbook.Windows.Count to confirm. Then you really aren't working with different workbooks - just different views of the same workbook. HTH, Bernie MS Excel MVP "Jordi" wrote in message ... 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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
I can't see a Workbook in WorkBooks.Count
Thank you for your attention, but isn't the case.
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. "Bernie Deitrick" escribió en el mensaje ... Jordi, If Workbooks.Count returns 1, then you have only 1 workbook open, with mutliple windows of that one workbook. Try using Debug.Print ActiveWorkbook.Windows.Count to confirm. Then you really aren't working with different workbooks - just different views of the same workbook. HTH, Bernie MS Excel MVP "Jordi" wrote in message ... 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. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
I can't see a Workbook in WorkBooks.Count
Jordi,
Why are you using two instances rather than a single instance? In your other application, you can find the current active Excel by using GetObject: Public xlApp As Excel.Application On Error Resume Next Set xlApp = GetObject("Excel.Application") If xlApp = Nothing Then Set xlApp = CreateObject("Excel.Application") End If You will need to have a reference set to the Excel object library in your other application. Then, you should be able to find all open workbooks, since you will only have one Excel. HTH, Bernie MS Excel MVP "Jordi" wrote in message ... Thank you for your attention, but isn't the case. 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
want to copy many workbooks into 1 workbook | Excel Discussion (Misc queries) | |||
how do I divide a workbook into two workbooks? | Excel Discussion (Misc queries) | |||
Convert 2 workbooks into 1 workbook | Excel Discussion (Misc queries) | |||
I'm trying to merge 2 workbooks into 1 new workbook. | Excel Discussion (Misc queries) | |||
Count of workbooks in a directory | Excel Programming |