S
Stephen sjw_ost
I have an Excel spreadsheet that is being used in a SharedWorkbook state. I
have placed buttons on the tabs for my users to save the file instead of
using the save button on the Excel Menu Bar. I do this so the button can
update the time on the worksheet(s) to indicate what time the save occured.
The problem I am having is when 2 or more users try to save at the same
time, with or without using the button(s). The first user will be able to
save just fine but anyone else saving at that moment will get an error that
the file is locked and to try again later.
How can I make a loop that will detect if the file is busy and loop until
the file is available again, once available, perform the save?
Just off the top of my head, something like;
Do
If application locked "need help here" then
loop until application unlocked "need help here"
Else
Application.ActiveWorkBook.Save
End If
I hope this question makes sense.
Any help with this is greatly appreciated.
have placed buttons on the tabs for my users to save the file instead of
using the save button on the Excel Menu Bar. I do this so the button can
update the time on the worksheet(s) to indicate what time the save occured.
The problem I am having is when 2 or more users try to save at the same
time, with or without using the button(s). The first user will be able to
save just fine but anyone else saving at that moment will get an error that
the file is locked and to try again later.
How can I make a loop that will detect if the file is busy and loop until
the file is available again, once available, perform the save?
Just off the top of my head, something like;
Do
If application locked "need help here" then
loop until application unlocked "need help here"
Else
Application.ActiveWorkBook.Save
End If
I hope this question makes sense.
Any help with this is greatly appreciated.