ShellExecute in MS Access

60
rate or flag this page

By msaccessmemento

Declaration

Const SW_SHOW = 1

Const SW_SHOWMAXIMIZED = 3

Public 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

Encapsulation

Sub RunProgram(ProgramPath As String, Optional args As String, Optional folder As String)

Dim RetVal As Long

On Error Resume Next

RetVal = ShellExecute(0, "open", ProgramPath, args, folder, SW_SHOWMAXIMIZED)

End Sub

Print   —   Rate it:  up  down  flag this hub

Comments

RSS for comments on this Hub

No comments yet.

Submit a Comment

Members and Guests

Sign in or sign up and post using a hubpages account.


optional


  • No HTML is allowed in comments, but URLs will be hyperlinked
  • Comments are not for promoting your hubs or other sites

Usage

call RunProgram("iexplore.exe","http://www.google.com")

working