Für dieses Beispiel benötigen Sie eine Form und einen CommandButton (Command1).
Private Declare Function SHRunDialog Lib "shell32" _
Alias "#61" (ByVal hOwner As Long, ByVal UnknownP1 _
As Long, ByVal UnknownP2 As Long, ByVal szTitle _
As String, ByVal szPrompt As String, ByVal uFlags _
As Long) As Long
Public Sub ShowRunDialog(ByRef CallingForm As Form, _
Optional Title As String, _
Optional Description As String)
' Vorgabe
If Title = "" Then Title = "Run"
' Vorgabe
If Description = "" Then Description = _
"Type the name of a program to open, " & _
"then click OK when finished."
SHRunDialog CallingForm.hWnd, 0, 0, _
Title, Description, 0
End Sub
Private Sub Command1_Click()
' Ruft den "Ausführen"-Dialog auf
' Optional können hier die Parameter übergeben
' werden.
ShowRunDialog Me
'ShowRunDialog Me, "Test", "Klick und öffne...."
End Sub