Shared Workbook Conflict Issue

gman1979

New Member
Joined
Oct 12, 2007
Messages
35
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
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top