Option Explicit
The following code works in visual Basic but I cannot seem to get it to work in vba 2010
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpszOp As String, ByVal lpszFile As String, ByVal lpszParams As String, ByVal lpszDir As String, ByVal FsShowCmd As Long) As Long
Public Function OpenFile(ByVal FileName As String) As Long
OpenFile = ShellExecute [This is where it hangs] (0, "Open", FileName, "", "C:\ALL_pdf_Cut_Sheets\Actuators\", 1)
End Function
Sub file_get()
OpenFile "C:\ALL_pdf_Cut_Sheets\Actuators\ms8105a1008.pdf"
End Sub
Any ideas appreciated...
Mark.....