Hi Folks,
I have a userform which multiple user will be accessing to enter data, this data will then be saved on another workbook, I’ll call this file "log" this workbook is shared so that more than one user can access it at the one time.
On the user form I’m using the last row code to find that last row before writing to a cell. When two users click this at the same time one of them will get the shared workbook conflict resolution dialogue box.
What I’m hoping to do but don't know if it's possible is to circumvent this dialogue box altogether, I have been looking over the web and in reference book, but can't find anything that addresses this in the way I want to.
I don’t want to use different tabs for different users as the idea is that anyone can use it.
Ideally I’d like the code in the userform to recognise the conflict, cancel the initial attempt to save, close the workbook they were writing to, then reopen it and retry saving it. As this reopened book would contain the other persons saved data and this would write on the row below therefore avoiding overwriting
In laymen’s terms I’d want the code to do the following:
If save results in data conflict
Then wokbooks(“log”).close savechanges:=false
Re open workbooks(”log”)
Get last row
Write info to last row
Workbook.save
Activeworkbook.close
I don’t know if this is possible but any help or suggestions would be greatly appreciated.
Thanks
I have a userform which multiple user will be accessing to enter data, this data will then be saved on another workbook, I’ll call this file "log" this workbook is shared so that more than one user can access it at the one time.
On the user form I’m using the last row code to find that last row before writing to a cell. When two users click this at the same time one of them will get the shared workbook conflict resolution dialogue box.
What I’m hoping to do but don't know if it's possible is to circumvent this dialogue box altogether, I have been looking over the web and in reference book, but can't find anything that addresses this in the way I want to.
I don’t want to use different tabs for different users as the idea is that anyone can use it.
Ideally I’d like the code in the userform to recognise the conflict, cancel the initial attempt to save, close the workbook they were writing to, then reopen it and retry saving it. As this reopened book would contain the other persons saved data and this would write on the row below therefore avoiding overwriting
In laymen’s terms I’d want the code to do the following:
If save results in data conflict
Then wokbooks(“log”).close savechanges:=false
Re open workbooks(”log”)
Get last row
Write info to last row
Workbook.save
Activeworkbook.close
I don’t know if this is possible but any help or suggestions would be greatly appreciated.
Thanks