Hallo,
da du mit Excel arbeitest, musst du die Excel-Datei mit Workbooks.Open öffnen. Außerdem hast du, wie computerschrat ja schon richtig dargelegt hat, eine leere Variable in deiner Open-Anweisung.
Hier mal ein Beispiel für einen funktionierenden Code:
Private Sub CommandButton1_Click()
Dim sPath As String
sPath = "C:\Users\Andreas\Desktop\test\" & ComboBox1.Value & ".xlsx"
Workbooks.Open (sPath)
Unload Me
End Sub
Private Sub UserForm_Initialize()
Dim strpath As String
Dim strFile As String
Dim strTabName As String
'das Verzeichnis anpassen!
strpath = "C:\Users\Andreas\Desktop\test\"
strFile = Dir(strpath & "*.xlsx")
With ComboBox1
.Clear
Do Until strFile = ""
.AddItem Left(strFile, InStr(strFile, ".") - 1)
strFile = Dir
Loop
'1. Eintrag auswählen
.ListIndex = 0
End With
End Sub
Gruß
M.O.