Hello, I have developed and tested an Access database that I now wish to distribute. It works well on all computers tested, including an Apple Mac running Parallels Desktop, but with one exception. When using the Mac, on the command to open an existing PDF it fails to deliver, with no error message. The VBA I am using to do this is as follows:
and
It works fine with Windows. Is there a compatibility problem with 'Parallels' on the Mac?
Thanks
Nick
Code:
Private Sub Form_DblClick(Cancel As Integer) On Error GoTo 10 Dim strFile As String Dim lngErr As Long strFile = "C:\Wheelbase\Invoices\" & Me!Account & "-" & Me![Inv No] & ".pdf" lngErr = ShellExecute(0, "OPEN", strFile, "", "", 0) 10 End Sub
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 ShowCmd As Long) As Long
Thanks
Nick
Comment