Option Explicit
Sub Test()
DoIt CStr(Selection.Value)
End Sub
Private Sub DoIt(myFolder As String)
'Achtung 'Verweis auf Microsoft Forms 2.0 Object Library
Dim Clp As New MSForms.DataObject
'Achtung 'Verweis auf "Windows Script Host Object Model"
Dim Sh As New WshShell
Dim strRoot As String
strRoot = Left(ThisWorkbook.Path, 3)
Clp.Clear
Sh.Run "cmd.exe /C Dir " & strRoot & myFolder & "* /b /s | clip", 0, True
Clp.GetFromClipboard
Sh.Run "explorer.exe " & Clp.GetText()
Set Sh = Nothing
End Sub
|