Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
access to a workbook per userlevel newbie_010108 Setting up and Configuration of Excel 0 June 8th 09 05:39 AM
how to access a cell value in a different workbook. HELP! [email protected] Excel Worksheet Functions 2 October 18th 06 09:32 PM
Workbook with 20+ queries of Access is TOO BIG Kevin76 Excel Discussion (Misc queries) 0 April 26th 06 04:33 PM
Shared Workbook Access? darknailblue New Users to Excel 4 April 18th 06 06:01 PM
link Access workbook to Excel workbook Toinett Excel Discussion (Misc queries) 1 January 31st 05 03:37 PM


All times are GMT +1. The time now is 05:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"