Hi All,
I'm trying to open a db using the shell command. I keep getting an invalid procedure call though??
here's what i have...
...but it's not working. i've had a look about and tried a couple of other things like ....
which does nothing at all just runs through the code and nothing happens?
can anyone help??
thanks, spin.
I'm trying to open a db using the shell command. I keep getting an invalid procedure call though??
here's what i have...
Code:
Dim rpt_db As String
rpt_db = GetDBPath & "WarePro_RPT_prod.mdb"
Shell rpt_db, vbHide
...but it's not working. i've had a look about and tried a couple of other things like ....
Code:
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
Private Const SW_HIDE As Long = 0
Private Const SW_SHOWNORMAL As Long = 1
Private Const SW_SHOWMAXIMIZED As Long = 3
Private Const SW_SHOWMINIMIZED As Long = 2
sub button1_Click()
ShellExecute Me.hwnd, "Open", rpt_db, vbNullString, GetDBPath,
SW_SHOWNORMAL
end sub
which does nothing at all just runs through the code and nothing happens?
can anyone help??
thanks, spin.