You can test directly against the functions returned value, no need for extra variables.
Sub Wb_Open() 'Opens R of C spreadsheet
Dim Wb As Workbook
Dim strFileName As String, strFullFileName As String
strFileName = "R of C.xls"
strFullFileName = "S:\Admin\Spring\Summer\2010\Automation\R of C.xls"
If IsWorkbookOpen("R of C.xls") Then '<< Function in Module 13
Set Wb = Workbooks(strFileName)
Else
Set Wb = Workbooks.Open(strFullFileName)
End If
End Sub
Is it just a typo you say "C of S.xls" when the code is checking for "R of C.xls" ?
Bookmarks