Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can't access to a Workbook
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can't access to a Workbook
"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? I presume you have the two workbooks given a name. You can do the coding by using the workbooks name followed with a !(eg workbook1.xls!) and then your method or function (eg workbook1.xls!function1) 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. This is what microsoft calls creating an excel instance= this means that each document has its own instance and/or thread(not sure about the threading)(java calls it constructors and multithreading). This means that u actually have 2 objects and that ?workbook.count gives you the amount of opened workbooks inside that object which is of course 1. The solution is: 1. I believe you can set the create instance thing of somewhere in the options 2. If you do not want to change the options you might give it a try with Application.Workbooks.Count I have tried the second option and it gave me 2(I did not change the options) for 2 instances of excel. Hope this helps, regards, Kevin Simons I'm using Excel 2002. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
access to a workbook per userlevel | Setting up and Configuration of Excel | |||
how to access a cell value in a different workbook. HELP! | Excel Worksheet Functions | |||
Workbook with 20+ queries of Access is TOO BIG | Excel Discussion (Misc queries) | |||
Shared Workbook Access? | New Users to Excel | |||
link Access workbook to Excel workbook | Excel Discussion (Misc queries) |