Hello,
I'm using VBA in Access to open Excel workbooks with the following code:
The If statement checks if the file is already open, for possible occasions where the workbook wasn't closed previously. In an instance where that does happen, how would I call a close for the previously opened file?
Thanks,
Russ
I'm using VBA in Access to open Excel workbooks with the following code:
Code:
If Not FileLocked(strFileName) Then
Set objApp = New Excel.Application
With objApp
Set objBook = .Workbooks.Open(strFileName, , False)
End With
End If
The If statement checks if the file is already open, for possible occasions where the workbook wasn't closed previously. In an instance where that does happen, how would I call a close for the previously opened file?
Thanks,
Russ