Hi,
I am creating a macro that copies info from workbook A, into workbook B, then saves and closes workbook B. However, when Workbook B is in use by another user, the macro stops and a message appears saying "File in use by another user (blah). Do you want to read only or save another copy?"
When this happens, I want the macro to click cancel, close workbook B, display a msgbox saying "File in use already, and end the macro. Try again later".
I would like code something like:
If errorbox appears then
click cancel
ActiveWorkbook.DisplayAlerts = false
Activeworkbook.close
Exit Sub
End If
Help?
Bookmarks