Hi all,
I have the following code in my module:
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
Under the click event of a button I have:
ShellExecute &0, "Open", txtpdffile.Text, vbNullString, "", SW_SHOWNORMAL
In txtpdffile, I"ve typed the name of a file I want to open in Acrobat. Zemp and johnwm helped me with this a while back. This code won't run and I'm stumped. When I click the button Vb finds an error with the .Text part of the textbox name, with SW_SHOWNORMAL and changes the code to:
ShellExecute &O0, "Open", txtpdffile.Text, vbNullString, "", SW_SHOWNORMAL
Any ideas, anyone?
I have the following code in my module:
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
Under the click event of a button I have:
ShellExecute &0, "Open", txtpdffile.Text, vbNullString, "", SW_SHOWNORMAL
In txtpdffile, I"ve typed the name of a file I want to open in Acrobat. Zemp and johnwm helped me with this a while back. This code won't run and I'm stumped. When I click the button Vb finds an error with the .Text part of the textbox name, with SW_SHOWNORMAL and changes the code to:
ShellExecute &O0, "Open", txtpdffile.Text, vbNullString, "", SW_SHOWNORMAL
Any ideas, anyone?