Some help please - trying to keep it simple
I have a UserForm which updates text boxes from selection in ComboBox. I would like to be able to change these populated boxes, and then with Update command, change the values in the sheet and then clear the form
I've been able to create the UserForm that adds the data, but i struggle to let VBA select the active cell and active row from the control box...????
Once I can get VBA to the correct AvtiveCell, i can use offset and change/add as needed
Private Sub ComboBox1_Change()
With Me
.TextBox1.Value = Sheet1.Cells(.ComboBox1.ListIndex + 2, 2)
.TextBox2.Value = Sheet1.Cells(.ComboBox1.ListIndex + 2, 3)
.TextBox3.Value = Sheet1.Cells(.ComboBox1.ListIndex + 2, 4)
.TextBox4.Value = Sheet1.Cells(.ComboBox1.ListIndex + 2, 5)
.TextBox5.Value = Sheet1.Cells(.ComboBox1.ListIndex + 2, 6)
.TextBox6.Value = Sheet1.Cells(.ComboBox1.ListIndex + 2, 7)
.TextBox7.Value = Sheet1.Cells(.ComboBox1.ListIndex + 2, 8)
.TextBox8.Value = Sheet1.Cells(.ComboBox1.ListIndex + 2, 9)
.TextBox9.Value = Sheet1.Cells(.ComboBox1.ListIndex + 2, 10)
End With
End Sub
Private Sub CommandButton2_Click()
Unload Me
End Sub
Private Sub EditAddButton_Click()
EditAdd
End Sub
Private Sub UserForm_Initialize()
TextBox1.SetFocus
End Sub