Clicking on the Update button in the image below, this code only posts changes to Textbox1. For some reason it doesn't post any changes made to Textbox2(below Textbox1 on rhe userform.
If I comment out the first ws line above, ( ws.Cells(r, 2).Value = Me.TextBox1.Text ),
the code runs the second ws line and changes are posted to col C(3) which is Textbox2.
I've used this same code successfully many times, with textboxes on a userform, but NOT with a listbox. It's as if something quirky is going on
I should be able to make changes to BOTH textboxes on the form and have them reflected back to the sheet in their proper cols.
Can someone please help me figure out what's happening and not happening here?
Thanks for anyone's help. I'm sure its something simple. This has worked many times.
cr
Code:
Private Sub cmdUPDATE_Click()
Dim ws As Worksheet
Dim r As Variant
r = ListBox1.ListIndex '----> current selected item and(sheet row) of Listbox1
If r = 0 Then
r = r + 1
Else
End If
Set ws = Worksheets("THEEAST")
With wst
ws.Cells(r, 2).Value = Me.TextBox1.Text ---> rhis line posts code successully to col B(2) of the sheet
ws.Cells(r, 3).Value = Me.TextBox2.Text '--->this line does not post changes to col C(3) for some reason
End With
End Sub
the code runs the second ws line and changes are posted to col C(3) which is Textbox2.
I've used this same code successfully many times, with textboxes on a userform, but NOT with a listbox. It's as if something quirky is going on
I should be able to make changes to BOTH textboxes on the form and have them reflected back to the sheet in their proper cols.
Can someone please help me figure out what's happening and not happening here?
Thanks for anyone's help. I'm sure its something simple. This has worked many times.
cr