I am trying to populate an ActiveX ComboBox with the values from a dynamic range from another workbook which I have set a variable for. The variable is returning the dynamic range properly but I can't figure out how to get these values into my combobox. Everything I try gives me a different error code. This is my latest attempt:
Code:
Dim prfile1 As StringDim prfile2 As String
Dim filepath As String
Dim checktotal As Integer
Dim checkrng As Range
Dim emunber As String
prfile1 = Worksheets("setup").Range("B10").Value
prfile2 = Worksheets("setup").Range("B7").Value
filepath = Worksheets("setup").Range("e10").Value
emunber = Worksheets("ReprintOld").Range("V3").Value
Workbooks.Open filepath & prfile2
Windows(prfile2).Activate
checktotal = Workbooks(prfile2).Worksheets(emunber).Range("AE2")
With Workbooks(prfile2).Worksheets(emunber)
Set checkrng = .Range(.Range("U5"), .Range("U" & 4 + checktotal))
End With
Windows(prfile1).Activate
ComboBox1.RowSource = checkrng