Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Changing betwen workbooks

If I have a Workbook with code opened, and an external application creates
and open a new workbook this second workbook is opened in a new Excel
Enviroment and I coudn't access to it form the first one.

I have to windows opened, but the code only returns one.

Public Function funfinestres()
Dim wdw As Window
For Each wdw In Application.Windows
MsgBox wdw.Caption
Next
End Function


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Changing betwen workbooks

A separate instance of excel is no different than any other application. If
you want to work with that instance, you would have to use GetObject, but I
don't think there is a way you can guarantee that it won't grab the current
instance.

You can use the API to find the separate windows, but I don't know how you
would convert that to a com interface so you could control that application.

--
Regards,
Tom Ogilvy

Jordi wrote in message
...
If I have a Workbook with code opened, and an external application creates
and open a new workbook this second workbook is opened in a new Excel
Enviroment and I coudn't access to it form the first one.

I have to windows opened, but the code only returns one.

Public Function funfinestres()
Dim wdw As Window
For Each wdw In Application.Windows
MsgBox wdw.Caption
Next
End Function




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
Hyperlink to cells in other workbooks keep changing GHawkins[_2_] Excel Worksheet Functions 3 July 15th 09 04:51 PM
Linked workbooks, changing links StephanieH Excel Worksheet Functions 0 October 31st 07 08:18 PM
Absolute value changing in linked workbooks Marnie Links and Linking in Excel 3 May 16th 06 12:50 AM
Changing source on multiple workbooks charlilot Links and Linking in Excel 1 January 26th 06 09:08 PM
Clear destination, then copy betwen workbooks John Wilson Excel Programming 3 July 22nd 03 02:41 PM


All times are GMT +1. The time now is 06:25 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"