Resetting Values in TextBoxes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Pankaj Upmanyu
    New Member
    • Sep 2007
    • 4

    Resetting Values in TextBoxes

    Hi,
    I need to know how to reset values in 40 textboxes in one go. Mind I am using 8 arrays of text boxes. Please help how to validate them for a rage of values. I am a new learner.
    Thanks
    Pankaj
  • hariharanmca
    Top Contributor
    • Dec 2006
    • 1977

    #2
    Originally posted by Pankaj Upmanyu
    Hi,
    I need to know how to reset values in 40 textboxes in one go. Mind I am using 8 arrays of text boxes. Please help how to validate them for a rage of values. I am a new learner.
    Thanks
    Pankaj
    I think the way you are going is wrong!

    Can you explain your problem with detail? (we can point you better).

    Comment

    • pureenhanoi
      New Member
      • Mar 2007
      • 175

      #3
      Originally posted by Pankaj Upmanyu
      Hi,
      I need to know how to reset values in 40 textboxes in one go. Mind I am using 8 arrays of text boxes. Please help how to validate them for a rage of values. I am a new learner.
      Thanks
      Pankaj
      this code will reset values of all textboxes in one form.
      Code:
      Private cmdReset_Click()
      Dim ctrl As Control
      On Error Resume Next
      For Each ctrl In Me.Controls
        If TypeName(ctrl) = "TextBox" Then
          ctrl.Text = ""
        End If
      Next
      End Sub

      Comment

      Working...