Detect a change in a Form

AlexanderBB

Well-known Member
Joined
Jul 1, 2009
Messages
2,073
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
My form sets up various parameters which are stored and used later. The user can change these to their preferences.
When the Forms closed I ask Save Yes/No. But I don;t need to if nothing's changed.
Is there anyway to know that without comparing every item. There's about 30 items that could change.
I'm petty sure there's not... but... ??
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
When you say that the user can change those parameters to their preferences, I'm assuming via code, correct? If so, you could declared a module-level Boolean variable to track whether a change has been made to the UserForm. So, when a change to a parameter is made, you would assign True to your Boolean variable. And, when the UserForm closes, you would first check the variable to see if a change has been made. If so, then you would ask whether to save.

Hope this helps!
 
Upvote 0
That's what I thought... meaning the boolean would need to be set on every change possible.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,335
Members
452,636
Latest member
laura12345

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