Consulting

Results 1 to 4 of 4

Thread: Clear all textboxes except 1

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Clear all textboxes except 1

    Hi all! Would really appreciate some help. I basically have a "Reset" button but I have one textbox that I'd like to not reset/clear when the button is pushed. I'm a big newbie and just not sure how to do that. Here is the code that I have...thank you in advance for your help!! The Textbox that I need to not clear is labelled "SysNameText"

    Private Sub CommandButton23_Click()
    n = MsgBox("Do not forget to UPLOAD your kit. Are you sure you want to continue?", vbYesNo, "New Config")
    If n = vbYes Then


    Dim ctl As Control


    For Each ctl In PipeKitConfig.Controls
    If TypeName(ctl) = "TextBox" Then
    ctl.Value = ""
    End If

    Next ctl
    For Each ctl In PipeKitConfig.Controls
    If TypeName(ctl) = "ComboBox" Then
    ctl.Value = ""
    End If

    Next ctl


    End If
    End Sub
    Last edited by Ryanchris; 11-13-2019 at 11:43 AM. Reason: add more info

Tags for this Thread

Posting Permissions

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