32 to 64bit code.

sassriverrat

Well-known Member
Joined
Oct 4, 2018
Messages
625
I have this piece of code that I've used from someone else on here. One problem....It works for 32bit systems but not 64. How would I "convert" this to work on both?

Thanks

Code:
Option Explicit
 
Enum W32_Window_State
    Show_Normal = 1
    Show_Minimized = 2
    Show_Maximized = 3
    Show_Min_No_Active = 7
    Show_Default = 10
End Enum
 
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
 

Some videos you may like

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Watch MrExcel Video

Forum statistics

Threads
1,113,775
Messages
5,544,152
Members
410,595
Latest member
Tatum2020
Top