devxlogo

ShowOpenWithDialog – Display the “Open with” dialog

ShowOpenWithDialog – Display the “Open with” dialog

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _    (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _    ByVal lpParameters As String, ByVal lpDirectory As String, _    ByVal nShowCmd As Long) As Long' Display the "Open with..." dialog and open the specified file with' the selected program'' Example:'   ShowOpenWithDialog "C:ProgramsMyProgMyFile.xyz"Sub ShowOpenWithDialog(ByVal sFileName As String)    ShellExecute 0, vbNullString, "RUNDLL32.EXE", "shell32.dll,OpenAs_RunDLL " _        & sFileName, "", vbNormalFocusEnd Sub

devx-admin

Share the Post: