I've created a combobox and filled the data with values from a named range, called "Kunden_mit_Adresse". Here is my code:
As you can see, I've created several textboxes. When a customer is selected from the combobox, I wish the data to be displayed in the textfields and be able to change the values (in the spreadsheet). See attached spreadsheet example.
My goal is that a customer's data can be changed with an Excel userform. Do I also need to know the row number? Have been on this for a long time.
The worksheet can be downloaded from http://ul.to/gyy0pi01
Thank you for your help
Massimo
Code:
'Set reference to the range of data to be filled
Set rngSourceKunde = Worksheets("Kunden").Range("Kunden_mit_Adresse")
'Fill the listbox
Set lbtarget = Me.lstKundenListe
With lbtarget
'Determine number of columns
.ColumnCount = 6
'Set column widths
.ColumnWidths = "0;130;110;20;0;20"
'Insert the range of data supplied
.List = rngSourceKunde.Cells.Value
End With
As you can see, I've created several textboxes. When a customer is selected from the combobox, I wish the data to be displayed in the textfields and be able to change the values (in the spreadsheet). See attached spreadsheet example.
My goal is that a customer's data can be changed with an Excel userform. Do I also need to know the row number? Have been on this for a long time.
The worksheet can be downloaded from http://ul.to/gyy0pi01
Thank you for your help
Massimo
![example.gif](/board/proxy.php?image=http%3A%2F%2Fi285.photobucket.com%2Falbums%2Fll43%2Fm_scola%2Fexample.gif&hash=1681435d4025ff987b018cce55d15cd5)
![m_scola](/board/proxy.php?image=http%3A%2F%2Fs285.photobucket.com%2Falbums%2Fll43%2Fm_scola%2F%3Faction%3Dview%26current%3Dexample.gif&hash=8446f46118847df0c89aba2230bf1dc3)