How to I stop mutiple update to my database?

Eben Ahulu

New Member
Joined
Mar 17, 2016
Messages
1
Dear All
My name is Eben and I just joined this forum after I heard a lot of good things about it.
I have recorded an excel vba program that will be used in updating a database on a monthly basis. I am worried that my colleagues may run the macro multiple times and may update the database multiple times with the same month's data.
How do I prevent this from happening please?
Thanks in advance for your help.
Eben
 

Some videos you may like

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

mole999

Moderator
Joined
Oct 23, 2004
Messages
10,524
Office Version
  1. 2019
  2. 2016
  3. 2013
Platform
  1. Windows
you could put a marker somewhere that you know of, that if you run the update gets set
example, you have a button that runs your code, when the code has completed you place an x in A1 of a sheet
The next time the button is pressed, it checks A1 and if x exists, then exits the sub routine.
when you want to update, you delete the x, and the code will complete and reapply the x
 

Watch MrExcel Video

Forum statistics

Threads
1,122,669
Messages
5,597,470
Members
414,145
Latest member
lonnie451

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