How to test : files are already opened or not

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How to test, wheather a particular excel file is already opened or not.
Please help me
 
This function does the job:

Public Function IsOpenWB(ByVal WBname As String) As Boolean
'returns true if workbook is open
Dim objWorkbook As Object
On Error Resume Next
IsOpenWB = False
Set objWorkbook = Workbooks(WBname)
If Err = 0 Then IsOpenWB = True
End Function

Regards,
Stefi


„kris†ezt írta:
 
You are welcome! Thanks for the feedback!
Stefi


„kris†ezt írta:
 

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

Back
Top