I am using shellexecute to open a pdf file. I get the acrobat splach screen, but acrobat never becomes visible. It is running if i check task manager though. Also if i then just type "acrobat" from the start/run menu it pops up with the file i reference. Here is the code i'm using. Not sure what the problem is. I get a return value of 42.
Thanks
Nick
Private Declare Function ShellExecute Lib "shell32" 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 cmdview_Click()
Screen.MousePointer = vbHourglass
f$ = Dir("\\storetermserv\invoices\*_" & Val(txtinvoice.Text) & "_*.pdf")
If f$ = "" Then MsgBox "Invoice # " & Val(txtinvoice.Text) & " was not found", vbOKOnly, "View Invoices": Screen.MousePointer = vbNormal: Exit Sub
retval = ShellExecute(0&, "Open", f$, "", "\\storetermserv\invoices\", SW_SHOWMAXIMIZED)
Screen.MousePointer = vbNormal
End Sub
Thanks
Nick
Private Declare Function ShellExecute Lib "shell32" 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 cmdview_Click()
Screen.MousePointer = vbHourglass
f$ = Dir("\\storetermserv\invoices\*_" & Val(txtinvoice.Text) & "_*.pdf")
If f$ = "" Then MsgBox "Invoice # " & Val(txtinvoice.Text) & " was not found", vbOKOnly, "View Invoices": Screen.MousePointer = vbNormal: Exit Sub
retval = ShellExecute(0&, "Open", f$, "", "\\storetermserv\invoices\", SW_SHOWMAXIMIZED)
Screen.MousePointer = vbNormal
End Sub