Hi again,
another issue is stopping me.
In the Userform8 I'm populating the listbox1 as following:
Me.ListBox1.ColumnWidths = "100;100;100;100;100;100;100;50"
Dim WS As Worksheet
Dim c As Range
Dim LastRow As Long
Dim A As Long
Label5.Visible = True
Me.TextBox2.Value = ""
Me.TextBox1.Value = ""
Me.ListBox1.Clear
'Me.ComboBox1.Clear
Set WS = Worksheets("DU")
With WS
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
With .Range("a2:a" & LastRow - 1)
Set c = .Find("*", LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
'If c.Offset(0, Range("F2").Column - 1) = "" Then
With Me.ListBox1
'Name
' .AddItem c.Offset(0, 0)
' .AddItem C.Offset(0, Range("A1").Column - 1)
'Column B - Invoice Number
.AddItem c.Offset(0, 1)
'Invoice Dae
.Column(0, .ListCount - 1) = c.Offset(0, 0) 'NOME FORNITORE
.Column(1, .ListCount - 1) = c.Offset(0, 1) 'num fattura
.Column(2, .ListCount - 1) = c.Offset(0, 2) 'DATA FATTURA
'Value
.Column(3, .ListCount - 1) = "Û " & c.Offset(0, 3) 'IMPORTO FATTURA
'When due
.Column(4, .ListCount - 1) = c.Offset(0, 4)
'When Paid
' If C.Offset(0, 5) = "" Then
' .Column(4, .ListCount - 1) = "No Date"
'Else
.Column(5, .ListCount - 1) = c.Offset(0, 5)
'End If
'Payment method
.Column(6, .ListCount - 1) = c.Offset(0, 20)
'Status
.Column(7, .ListCount - 1) = c.Offset(0, 21)
'row number of the record
.Column(8, .ListCount - 1) = c.Row
End With
' End If
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
End With
End Sub
Now I would like that when I double click on a row of the listbox1, the selected record (8 columns) is populating the Listbox1 in the userform9
No idea how to do it.
thank you in advance.
Giacomo
Bookmarks