G Guest Jul 3, 2007 #1 How to test, wheather a particular excel file is already opened or not. Please help me
G Guest Jul 3, 2007 #2 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:
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: