
Setting / finding path to an Application
Try:
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
If ShellExecute(0&, vbNullString, sAppStartUpCommand, sAppStartUpSwitches,
sAppStartUpDir, lAppStartUpView) < 32 Then
Msgbox "Error"
End If
Martijn
Quote:
> I need to shell out of my app (a vb app) to start an Access app.
> But to do this it appears I need to know the exact path to the msaccess
> application (msaccess.exe). So is there anyway of either selecting the
> default exe associated with .mdb app to start (as one would expect) or
> querying Windows to find msaccess.exe's location?
> Many thanks, I've racked my brain & documentation over this one.
> Alex Kudrasev