Detecting if Excel Workbook is already open

R

RzB

I have an Access db that opens an Excel .wks file
and dumps some data to it. I want to be able to
detect if the .wks file is already open. I have found
a number of older posts that have suggested ways
to do this but I don't seem to be able to get any of
them working. I'm using Access/Excel 2002.
Is there a simple way of doing this?
Many thanks,
Roy
 
D

Douglas J. Steele

First, find out whether Excel is open at all. If it is, loop through the
Workbooks collection of the Excel application, checking to see whether or
not your wks file is there.
 
T

TC

He'll have troubles, though if he uses GetObject (which I assume is what you
have in mind), & there are several copies running.

TC
 
R

RzB

TC,Douglas,

I'll look at the sites you suggets. I was
hoping for a solution that did not drive
me down the API road.

Anyway - many thanks for your help.

Roy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top