lixtifur36
Programmer
I am making a setup program in Visual Basic for my Access App. I want the setup program to Opthen the Access program, which works fine. I also want it to display the folder in a window on screen, which I cannot get to work. Can anyone please help. I should have the setup program test if MS Access exists. Is that possible to do in VB?
My code is as follows:
Option Explicit
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 Sub Command1_Click()
Dim startUp As Long
startUp = ShellExecute(0, "OPEN", "c:\test.mdb", vbNullString, vbNullString, 3) 'works fine
startUp = ShellExecute(0, "Explore", "c:", vbNullString, vbNullString, 2) 'does not show the window
End ' end the program
Thank you
My code is as follows:
Option Explicit
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 Sub Command1_Click()
Dim startUp As Long
startUp = ShellExecute(0, "OPEN", "c:\test.mdb", vbNullString, vbNullString, 3) 'works fine
startUp = ShellExecute(0, "Explore", "c:", vbNullString, vbNullString, 2) 'does not show the window
End ' end the program
Thank you