How does Excel determine if a file is already in use?

P

Paul MacFarlane

Is it only if the OS tells it?

I've posted a message (with no response) so I'm asking a different way.
 
J

JP

In VBA terms, it would be part of the Workbooks collection.

If you were so inclined, here is a UDF (User Defined Function) that
would tell you if a specific book is open.

Function IsOpen(wbook As String) As Boolean
Dim wb as Excel.Workbook

IsOpen = False

On Error Resume Next
Set wb = Workbooks(wbook)
If Err = 0 then
IsOpen = True
End If
On Error Goto 0

Exit Function


HTH,
JP
 
P

Paul MacFarlane

Thanks JP...

What I am finding is there are some other things going on with this workbook
too...
If I copy the workbook to a local drive I get this XLQUERY.XLA missing
message: http://support.microsoft.com/kb/277620
Although the workaround doesn't...

But having it work from the local drive indicates a network (OpLocks)
problem.



In VBA terms, it would be part of the Workbooks collection.

If you were so inclined, here is a UDF (User Defined Function) that
would tell you if a specific book is open.

Function IsOpen(wbook As String) As Boolean
Dim wb as Excel.Workbook

IsOpen = False

On Error Resume Next
Set wb = Workbooks(wbook)
If Err = 0 then
IsOpen = True
End If
On Error Goto 0

Exit Function


HTH,
JP
 
J

JP

What version of XL are you using? If you aren't using XL 97, you
shouldn't be saving in that format (unless you need backward
compatibility for some reason).

--JP
 
P

Paul MacFarlane

XL2003...

Not saving in that format. The person that created the file doesn't have
XLQUERY.XLA on his machine either...

What version of XL are you using? If you aren't using XL 97, you
shouldn't be saving in that format (unless you need backward
compatibility for some reason).

--JP
 
J

JP

Sorry, if you read that KB and tried the workaround and it still isn't
fixed, there's nothing else I can suggest.

--JP
 
P

Paul MacFarlane

Thanks.


Sorry, if you read that KB and tried the workaround and it still isn't
fixed, there's nothing else I can suggest.

--JP
 

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