check if Userform textboxes are dirty (Me.dirty)

laurawr

New Member
Joined
Mar 3, 2011
Messages
32
Hi,

I have a form that is used for editing data in a spreadsheet.

First my code retrieves the data from a listview search facility and it then goes into several text boxes for editing.
Once edited the user must click an "update" button and this writes the new data to the spreadsheet.

The problem:
On the button click, I want the code to check if the form data in various text boxes have been edited at all, and then to display a message box to say
no fields have been edited if the data hasnt changed. at the moment the button click just updates the spreadsheet whether data has been edited or not.

Looking around I see that me.dirty could solve the problem. However i'm completely baffeled at how to use me.dirty after many attempts.


If you could help me I would be most appreciative.
Any other suggestions are welcome :)

Thanks

L
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Laura

As far as I'm aware you can't use Dirty with userforms in Excel.

It's usually associated with Access forms, which are more then likely bound to a record source.

Couldn't you just monitor the Change and Exit events of the textboxes?
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,762
Members
452,940
Latest member
rootytrip

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