tnkcoll,
What I posted shows that what you asked for can be done.
If your workbook has alot of userforms setting up the array of userform names will be the biggest obstacle.
Here is a routine that will extract the userform names without loading the individual forms so you can set up an array on a sheet to use.
Code:
Sub get_FormNames()
Dim Count_xItems As Long
Dim xItem As Integer
Dim i As Long
i = 2
Count_xItems = ThisWorkbook.VBProject.VBComponents.Count
For xItem = 1 To Count_xItems
'item.type 1 = Module
'item.type 3 = Forms
'item.type 100 = Worksheets
If ThisWorkbook.VBProject.VBComponents.Item(xItem).Type = 3 Then 'Forms
Debug.Print ThisWorkbook.VBProject.VBComponents.Item(xItem).Name
'Cells(i, 3).Value = ThisWorkbook.VBProject.VBComponents.Item(xItem).Name
i = i + 1
End If
Next xItem
End Sub
This code will result in Runtime Error 1004 Method 'VBProject' of object '_Workbook' failed if in the Excel macro security area, Visual Basic Project is not selected as a trusted source.
Myself I would try setting up a two column array on a sheet with the persons name next to the appropriate userform and use that to populate your original combobox with bonding to the second column. That way you wouldn't need to leave the trusted source open.
Any problems or questions, please post back
NoS
Bookmarks