I'm always having problems with sheets activation. In this case my range returns as nothing. The comand is activated in a combo placed in a different sheet of the same file.
In any of the set options the result for my i range is "Nothing" and the error if I move on top of the line is Error 1004 “Application-defined or Object-defined error”
Thank you
Private Sub CMBCliente_DropButt*******()
Dim i As Range
Dim Clienti As Worksheet
Dim lrow As Long
Set Clienti = Sheets("Clienti")
With Sheets("Clienti")
lrow = .Cells(Rows.Count, 2).End(xlUp).Row
Set i = ThisWorkbook.Sheets("Clienti").Range(Cells(1, 2), Cells(lrow, 2))
Set i = Clienti.Range(Cells(1, 2), Cells(lrow, 2))
Set i = Clienti.Range(Cells(1, 2), Cells(lrow, 2))
End With
Me.CMBCliente.ListFillRange = i.Address
End Sub
In any of the set options the result for my i range is "Nothing" and the error if I move on top of the line is Error 1004 “Application-defined or Object-defined error”
Thank you
Private Sub CMBCliente_DropButt*******()
Dim i As Range
Dim Clienti As Worksheet
Dim lrow As Long
Set Clienti = Sheets("Clienti")
With Sheets("Clienti")
lrow = .Cells(Rows.Count, 2).End(xlUp).Row
Set i = ThisWorkbook.Sheets("Clienti").Range(Cells(1, 2), Cells(lrow, 2))
Set i = Clienti.Range(Cells(1, 2), Cells(lrow, 2))
Set i = Clienti.Range(Cells(1, 2), Cells(lrow, 2))
End With
Me.CMBCliente.ListFillRange = i.Address
End Sub