Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am writing code in which I want to check the text value of a text box upon
the exit from a text box against the value that was there upon the Enter event. I seem to be having a problem passing this variable from the Enter event procedure to the Exit event procedure. Anything obvious I'm missing? Also, is there a better way to do what I'm trying? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something like......
' at top of userform code module Dim TextBefore As String Private Sub TextBox1_Enter() TextBefore = Trim(TextBox1.Value) End Sub Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) If Trim(TextBox1.Value) = TextBefore Then MsgBox "No Change" Else MsgBox "Changed" End If End Sub Private Sub UserForm_Initialize() TextBefore = Trim(TextBox1.Value) End Sub -- Regards, Nigel "dunnerca" wrote in message ... I am writing code in which I want to check the text value of a text box upon the exit from a text box against the value that was there upon the Enter event. I seem to be having a problem passing this variable from the Enter event procedure to the Exit event procedure. Anything obvious I'm missing? Also, is there a better way to do what I'm trying? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
CommandButton still visible until enter and then exit design mode | Excel Programming | |||
Events for Enter/Exit Textboxes on Userforms | Excel Programming | |||
Button clicks and textbox Exit events | Excel Programming | |||
Can't move from one cell and/or enter any data, or exit wksht... | Excel Discussion (Misc queries) | |||
On Enter and On Exit events of MSFORMS controls? | Excel Programming |