PDA

View Full Version : Edit rows with userform textboxes and coboboxes



dotchiejack
04-11-2016, 05:08 AM
Hello dear helpers,
I am trying to edit entries in a row from userform input
When i click in the listbox the userform is filled and the button ingave aanpassen is enabled, when I change something and i push the button it changes the first row what is actualy the header row,it should replace in the correct row and i cannot find out how:wot
It is this part of the code:

Private Sub SaveRow()
Cells(lCurrentRow, 1).Value = TextBox1.Text
Cells(lCurrentRow, 2).Value = ComboBox1.Text
Cells(lCurrentRow, 3).Value = ComboBox2.Text
Cells(lCurrentRow, 4).Value = ComboBox3.Text
Cells(lCurrentRow, 5).Value = ComboBox4.Text
Cells(lCurrentRow, 6).Value = TextBox2.Text

End Sub
Example included
Please help

Aflatoon
04-11-2016, 06:00 AM
Crossposted: http://chandoo.org/forum/threads/something-strange-with-listbox.28805/

snb
04-11-2016, 02:27 PM
Has been solved elsewhere: helpmij.nl