VBA - allow concurrent change for shared workbook

logstarter

New Member
Joined
Apr 14, 2017
Messages
36
Hi,

I have a VBA program to mark the application no which is generated sequentially. There are multiple worksheets for different types of application. The workbook is shared to be updated by a group of people. The sequential no is a counter stored in one of the worksheet, counting no of application generated each day.

For example, I have app A and app B worksheet. When student A generates the first app no in worksheet "app A", the app no generated will be 19041000001, afterwards, if student B generates another app no in worksheet "app B", the app no generated will be 19041000002 and so on.

My problem is that since it's a shared workbook. When student A and student B opens the file to update, the counter is showing the same sequential no, and if they make the update concurrently, they will get the same app no.

I would like to ask if there are anyway to update the workbook simultaneously? or is there any way to notify the another user that someone is updating the log?

Thank you.
 

Some videos you may like

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

logstarter

New Member
Joined
Apr 14, 2017
Messages
36
I am thinking if I refresh the workbook before assigning the application no, will it be a good approach

Code:
[COLOR=#242729][FONT=Consolas]ActiveWorkbook.RefreshAll
[/FONT][/COLOR]
 

Watch MrExcel Video

Forum statistics

Threads
1,122,464
Messages
5,596,288
Members
414,052
Latest member
Dual Showman

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
Top