![]() |
Checking if another workbook is open
I always use this method - it's simple and works well.
jp "Bob Phillips" wrote: On Error Resume Next Set oWB = Workbooks(Filename:="Worksheet in basis.xls") On Error Goto 0 If oWB Is Nothing Then MsgBox "Workbook not open" Exit Sub End If -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "Matthew Balch" wrote in message ... Hi, I have a mcro that extracts data from another workbook which is created from a download of another application. How do I in VB write it to check to see if this download is available. The workbook I need to check to see if it is open in the application is called 'Worksheet in basis'. If not available then will simply cancel the macro and prompt the user to extract the data accordingly. Thanks in advance Matthew Balch |
All times are GMT +1. The time now is 02:17 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com