Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving in Shared mode
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. -- Stephen |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving in Shared mode
I figured out my own answer.
Do On Error Resume Next ActiveWorkbook.Save Loop until ActiveWorkbook.saved = True Thank you. -- Stephen "Stephen sjw_ost" wrote: 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. -- Stephen |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Disappearing comments in shared mode | Excel Discussion (Misc queries) | |||
Saving shared spreadsheets on a shared drive. | Excel Discussion (Misc queries) | |||
Convert a wokbook to shared mode | Excel Programming | |||
Problem with file in "Shared Mode" | Excel Discussion (Misc queries) | |||
how open dbf in shared mode? | Excel Programming |