Results 1 to 4 of 4

Thread: [RESOLVED] Textbox data change?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2002
    Posts
    86

    Resolved [RESOLVED] Textbox data change?

    Is there an easy way to find out if someone made a change in the textbox, like capturing what was in there before and then catch it after it is done?

  2. #2
    Hyperactive Member DubweiserTM's Avatar
    Join Date
    Dec 2005
    Location
    St-Ferdinand, Québec
    Posts
    427

    Re: Textbox data change?

    Could you use the Change event ???

    Code:
    Private Sub Text1_Change()
      MsgBox "The textbox value changed"
    End Sub
    DubweiserTM

    If your question has been answered, you can mark a thread as resolved...

  3. #3
    eltiT resU motsuC Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Textbox data change?

    something like this:

    VB Code:
    1. Dim PrevVal As String
    2. Dim CHANGED As Boolean
    3.  
    4. Private Sub Text1_Change()
    5.     CHANGED = True
    6. End Sub
    7.  
    8. Private Sub Text1_GotFocus()
    9.     PrevVal = Text1
    10. End Sub
    11.  
    12. Private Sub Text1_Validate(Cancel As Boolean)
    13.     If CHANGED Then
    14.         CHANGED = False
    15.         MsgBox "Old Value: " & PrevVal & "   New Value: " & Text1
    16.     End If
    17. End Sub
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jul 2002
    Posts
    86

    Re: Textbox data change?

    Thanks Static... That is what I needed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width