I have an automated unmanned workbook 'Alpha' periodically running a macro to open up workbook 'Beta' to process data and then save workbook 'Beta'. But, workbook 'Beta' can also be opened by another user to perform updates/save on their own. If 'Beta' is already open by a user and 'Alpha' macro doesn't open it and returns the 'File in Use - file is locked for editing' error box.
My goal would be for the 'Alpha' macro to prevent the error box from opening and simply ascertain that 'Beta' is 'locked' and handle it with alternate code.
Sort of like this:
My goal would be for the 'Alpha' macro to prevent the error box from opening and simply ascertain that 'Beta' is 'locked' and handle it with alternate code.
Sort of like this:
Code:
Workbooks.Open Filename:= "C:\Beta"
If "Beta" is locked Then
do this.....
Else
do that....
End If