Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Use the tag property to store the values on click OK and check that everytime when you click OK . Something as below Private Sub btnOK_Click() 'Click OK Dim blnChange As Boolean For Each ctl In UserForm1.Controls If ctl.Tag < ctl.Text Then blnChange = True ctl.Tag = ctl.Text Next If blnChange = True Then 'Data changed 'do something End If End Sub -- If this post helps click Yes --------------- Jacob Skaria "Ryan H" wrote: I want to notify the user if they make any changes to the userform when they click the OK button on the userform. The userform has about 90 controls on it. Do I have to set the variable bolFormChanged = True under a Change Event for each control or is there a shortcut to doing this? Thanks in Advance! For Example, Private Sub btnOK_Click() If bolFormChanged = True Then ' notify user with msgbox Else ' Do This End If End Sub -- Cheers, Ryan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
UserForm Control references as variable | Excel Programming | |||
Passing variable values to userform control | Excel Discussion (Misc queries) | |||
changing selected label on userform w/ a variable | Excel Programming | |||
UserForm not passing Boolean variable | Excel Programming | |||
Assigning the name of a userform/control to a changing string | Excel Programming |