Hi I am trying to assign values to a Combobox, but am getting run-time error 381. Does anyone know why? Here is the code where the error occurs -
LastAddress = Sheets("TempList").Range("A100").End(xlUp).Address
ComboBox1.List = "TempList!A2:" & LastAddress
Thanks so much!
Here is the revised code that worked. Thanks much.
Dim myArray As Variant
Dim wss As Worksheet
Set wss = Sheets("TempList")
With wss
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
myArray = Sheets("TempList").Range("A2:A" & LastRow)
Sheets("CompRecTool").Activate
ComboBox1.List = myArray
End With