Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
you could use the events of individual controls to achieve this, but don't you find it a little unnatural? It seems you are displaying a form to let the user edit something, and the user should be able to choose to cancel. If I were you I'd encapsulate the work into a single function instead of bothering with individual control's events. Using custom types this becomes very clean and simple. As an example, let's assume we are editing a person in a simple address book. Then the following should give you an idea. Type TPersonSettings -----Original Message----- When my text box receives focus, what event occurs? I need this to be able to undo user's changes. Dim OldValue as String 'when TextBox receives focus OldValue = TextBox1.Text 'when user decides to discard changes TextBox1.Text = OldValue Thanks in advance, Mike510 . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Textbox added to Form at runtime too small, can't control size andchange event won't trigger | Excel Worksheet Functions | |||
Textbox added to Form at runtime too small, can't control size andchange event won't trigger | Excel Worksheet Functions | |||
Action Event, CheckBox, Add Row and Textbox | Excel Discussion (Misc queries) | |||
How can I expose the TextBox BeforeUpdate event to my user class? | Excel Discussion (Misc queries) | |||
Which textbox have focus? | Excel Programming |