![]() |
|
#1
|
||||
|
||||
![]()
You will get that error if you run the code in the 64 bit version of VBA. Replace
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 nShowCmd As Long) As Long Code:
Private Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _ (ByVal hwnd As LongPtr, _ ByVal lpOperation As String, _ ByVal lpFile As String, _ ByVal lpParameters As String, _ ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As LongPtr
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
gmaxey | Word VBA | 1 | 07-14-2019 11:48 AM |
![]() |
Paul Cain | Excel Programming | 2 | 11-19-2018 04:29 AM |
Ribbon button - showLabel attribute ignored | yiannis.spyridakis | Excel Programming | 2 | 06-12-2012 11:21 PM |
What slide attribute can I use in VBA to detect hidden slide? | mikel401 | PowerPoint | 1 | 02-22-2011 11:13 AM |