View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jive Jive is offline
external usenet poster
 
Posts: 34
Default VBA to reattempt to open if file is read only

I Assume i would use but never done so before

On Error Resume Next

"Jive" wrote:

As per title really

I am making a temporary database in excel which will also be a functional
model for one we are having made externally.

However because of the number of people using it at some point two people
are going to hit the update button at the same time and one of them will get
a read only box appear.

What i would like to do is insead of the 2nd user getting the error message,
for the VBA code to wait 1 second and retry, and repeat until the file opens
before continuing.


Application.ScreenUpdating = False
Application.DisplayAlerts = False
DesignManager = ActiveWorkbook.Name

Workbooks.Open Filename:="J:\ProSys\DataBase\Projects Master.xls"
' If error wait one second and retry
ProjectsMaster = ActiveWorkbook.Name

Any help would be apreciated.