0

I have a button on this tabpage which, when a user clicks, clears all of the fields. However, I have set one textbox to a read-only textbox which has a counter in it. How can I programmatically clear all of the other fields, minus this textbox. (There are other textboxes on this tab.

This is what code I have for clearing the textbox fields:

  For Each Me.cControl In TabPage3.Controls
            If (TypeOf cControl Is TextBox) Then
                cControl.Text = ""
            End If
3
Contributors
3
Replies
12
Views
3 Years
Discussion Span
Last Post by Gus_19
1

How about

For Each tbx As TextBox In Me.Controls.OfType(Of TextBox)()
    If Not tbx.ReadOnly Then
        tbx.Text = ""
    End If
Next
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.