For any API calls on a 64-bit system or in Office 2010 x64, you need to rewrite the code. You can still write it for earlier versions of VBA, but you need to use VBA7 and / or Win64 compilation conditional variables. For instance:
Declare PtrSafe 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
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
Here's an article about it http://msdn.microsoft.com/en-us/library/ee691831(office.14).aspx
source
share