I put together a solidly working userform that uses data from the worksheet to populate the combobox that would then select the record with which to populate the userform. I was using a named range (also defined in VBA) to do this. However, I now want to use different columns to select from, and I can't seem to get the named range to organize the rows how I want. What I want is column "i" to be the first choice, with column "c" as the second criteria (previous, I used b and c). I have set up the named range to run from c to i, and then set column width for everything NOT "c" or "i" to zero. But how do I make "i" show first? Or is this something named ranges cannot do?
Private Sub UserForm_Initialize()
fPath = ThisWorkbook.Path & "\"
currentRow = 4
sheetName = Sheet5.Name
lastRow = Sheets(sheetName).Range("C" & Rows.Count).End(xlUp).Row
'set up a named range for the ComboBox as "vUID"
Sheets(sheetName).Range("i4:c" & Range("i4").End(xlDown).Row).Name = "vUID"
Me.ComboBox1.RowSource = "vUID"
PopulateControls
This is literally my LAST punchlist item to close out this project, so the help would be greatly appreciated!
Bookmarks