Sub initializeUF1(SheetTitle, SelectedFile)
Dim ws As Variant
Dim wkb As Workbook
Set wkb = Workbooks.Open(SelectedFile)
For Each ws In wkb.Sheets
c00 = c00 & "|" & ws.Name
Next
If SelectedFile <> "" Then
With Userform1
.SelectedFile = SelectedFile
.ComboBox1.List = Split(Mid(c00, 2), "|")
.Show
End With
End If
End Sub
With this above code I was able to accomplish what I wanted with the userform, all I need now is to know how to assign the combobox selection to a variable in the main module any thoughts.
This is what I have for in the Userform:
Private Sub CommandButton1_Click()
Dim SheetTitle As String
SheetTitle = Userform1.ComboBox1.Value
Userform1.Hide
End Sub
Also side-note I really appreciate all the help!
Bookmarks