Checking the open-status of a office-document 
Author Message
 Checking the open-status of a office-document

How can I check from access-vba if an excel-file is opened? My problem is that
I'm getting just errors when I'm trying to open an already opened file.
1) Is it possible to multiple open a document?
2) If not, how can I be sure, that it is not open
3) when the document is open, how can it be closed from vba?

Thanks for your help,

Christian Hell
--
_____________________________________________________________
NewsGroups Suchen, lesen, schreiben mit http://www.*-*-*.com/



Wed, 27 Nov 2002 03:00:00 GMT  
 Checking the open-status of a office-document
Hi Christian,

Quote:
> How can I check from access-vba if an excel-file is opened? My problem is that
> I'm getting just errors when I'm trying to open an already opened file.

How are you trying to open it? Show us your code?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
http://go.compuserve.com/MSOfficeForum

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)



Sat, 30 Nov 2002 03:00:00 GMT  
 Checking the open-status of a office-document
Hi, Christian,

Maybe the following code will help you.

      For intI = 1 To xlApplication.Workbooks.Count
        If xlApplication.Workbooks(intI).Name = strFileName Then
          Set xlBook = xlApplication.Workbooks(intI)
          xlBook.Close SaveChanges:=True
          Exit For
        End If
      Next intI

Wout de Groot.



Quote:
> How can I check from access-vba if an excel-file is opened? My problem is
that
> I'm getting just errors when I'm trying to open an already opened file.
> 1) Is it possible to multiple open a document?
> 2) If not, how can I be sure, that it is not open
> 3) when the document is open, how can it be closed from vba?

> Thanks for your help,

> Christian Hell
> --
> _____________________________________________________________
> NewsGroups Suchen, lesen, schreiben mit http://netnews.web.de



Sat, 30 Nov 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Opening and updating Office 2000 documents in an open event macro

2. Check Out Of Office status on exit

3. Checking open status of an ADO recordset

4. open a document and make it invisible in office 97

5. Catch-22 when trying to obtain properties of an open Office document

6. Opening MS-Office Documents in Internet Exprorer

7. opening office document with Dsoframer control

8. How to use the WebBrowser control to open an Office document

9. Trouble Opening a Word Document with VB.NET,Open member not found in Documents

10. Check if there is a document open.

11. Checking for password protection befor opening a Word document

12. Checking to see if Word document is open

 

 
Powered by phpBB® Forum Software