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
Private Const SW_SHOW = 5
private sub command1_click()
dim strPath as string
if right(app.path,1)<>"\" then
strPath=app.path & "\"
else
strPath=app.path
end if
strpath=strpath & "form2.exe"
ShellExecute Me.hwnd, "open", strpath, vbNullString, vbNullString, SW_SHOW
end sub