Quote Originally Posted by GTO View Post
Greetings and welcome to VBAX ,

I am awfully rusty (a year away!), but this appears to work:

Private Sub UserForm_Initialize()
Dim LastRow             As Long
Dim N                   As Long
Dim lCol                As Long
Dim lRow                As Long
Dim RowInColOne         As Long
Dim ColumnInCurrentRow  As Long
Dim MyArray             As Variant
Dim MyData              As Variant
Dim bHasData            As Boolean
  
  With ListBoxPazienti
    .ColumnCount = 9
    .ColumnWidths = "100"
  End With
  
  MyArray = Array("Sheet1", "Sheet2", "Sheet3")
  
  For N = LBound(MyArray) To UBound(MyArray)
    If ShExists(MyArray(N), ThisWorkbook) Then
      LastRow = ThisWorkbook.Worksheets(MyArray(N)).Cells(ThisWorkbook.Worksheets(MyArray(N)).Rows.Count, "I").End(xlUp).Row + 1
      MyData = ThisWorkbook.Worksheets(MyArray(N)).Range("A4:I" & LastRow).Value
      For RowInColOne = 1 To UBound(MyData)
        ListBoxPazienti.AddItem MyData(RowInColOne, 1)
        For ColumnInCurrentRow = 2 To UBound(MyData, 2)
          ListBoxPazienti.List(ListBoxPazienti.ListCount - 1, ColumnInCurrentRow - 1) = MyData(RowInColOne, ColumnInCurrentRow)
        Next
      Next
      bHasData = True
    End If
  Next N
  
  If bHasData Then ListBoxPazienti.ListIndex = -1
  
End Sub
Hope that helps,

Mark

PS. - Not sure why you are adding a row to LastRow, as this would seem to grab a blank row? I'll try and check back tomorrow.
Thanks a lot for your help. I added a blank row at the end only to check the beginning of the new sheet during my test.

I will try your code as soon as possible.
Let you know asap.

Thanks again