Hello, I have a combo box, text box, Save button and a multi col list On a user form with vb excel
The combo box is filled with the index of the list ( 0 through Mylist.listcount-1)
The user enters data into the textbox, which after you click a save command, it appears in the list, on the row specifyed by the combo box.
Is there a way to save on the fly, like get rid of the button?
I tried to code it in the combo box but nothing comes up!
Here is what i was trying, I was trying to make it so what ever was in the spot on the list would appear and if the user edits it, it changes.
Thanks for any suggestions!
The combo box is filled with the index of the list ( 0 through Mylist.listcount-1)
The user enters data into the textbox, which after you click a save command, it appears in the list, on the row specifyed by the combo box.
Is there a way to save on the fly, like get rid of the button?
I tried to code it in the combo box but nothing comes up!
Here is what i was trying, I was trying to make it so what ever was in the spot on the list would appear and if the user edits it, it changes.
Thanks for any suggestions!
Code:
Private Sub ComRow_Change()
Dim k As Integer
dim i as integer
i = ComRow.listIndex
k = ComRow.ListCount
If ComRow.Text > i Or ComRow.Text < 0 Then
MsgBox ("Please enter a value between 1 and " & k)
Exit Sub
End If
If ComRow.Text = "" Then
Exit Sub
End If
txtPM.Text = listEquip.list(i, 7)
listEquip.list(i, 7) = txtPM.Text