View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier Jon Peltier is offline
external usenet poster
 
Posts: 6,582
Default Excel 2003 - VBA File already opened

I don't have the specific code on hand to do this, but I have done it in the
past.

Essentially you have to use Windows APIs to check out each main window on
your system, see which are running Excel, and see which child windows of the
Excel windows represent the particular workbook.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
_______


"thomas" <nomail wrote in message
...
Hello,

I want to open an Excel file through VBA and i first test if it's already
opened or not. If it's already opened i just reactivate it.

My problem is that sometimes the file is re-opened because it's already
opened but in an other instance of Excel.

How can i check all the instances of Excel?

Thanks