Hello again,
I have a button on a userform that will generate certain text in a combo box.
The combobox then goes to a worksheet.
If I select a second button, I want the first information on the worksheet to clear and accept the new information from the next button.
NOTE: I have it as a combobox so I can either select it from the combobox or click the button. When I select the information from the combobox, it does clear out everything automatically.
Here is my code:
Private Sub CommandButton2_Click()
Worksheets("score").Range("B6").ClearContents
ComboBox1.Text = ComboBox1.Text + "PASS"
Worksheets("score").Range("b6") = Me.ComboBox1.Value
TextBox2.SetFocus
End Sub
What I think I am doing is clearing the cell, entering my text then going to the next text box, but when I click the second button (same code, text is "FAIL"), I then get "PASSFAIL" in cell B6.
I want it to clear out the previous entry and only use the new one, but it keeps all that I click even though I said to clear the contents.
Any thoughts??
Thanks in advance for your help.
Bookmarks