I am using the open dialog box to ask my users what excel spreadsheet they want to use. However, I want to create it so if that file is already open, it will switch to it, instead of getting an error. Is this possible? I know how to do this if I knew the name of the file but not when the user choses the file. Here is my code:
[VBA]Application.Dialogs(xlDialogOpen).Show[/VBA]
and this is the code if I knew the name of the book:
[VBA]On Error Resume Next
Set WB(2) = Workbooks("BusinessReportingReference.xls")
If Err = 9 Then
Workbooks.Open ("H:\@Business_Reporting_Today\References\BusinessReportingReference.xls ")
Else
WB(2).Activate
End If
End Sub[/VBA]