...

MS Excel VBA

vba 32 bit to 64 bit convert

the project code must be updated for use on 64-bit system

Compile error when you edit a VBA macro in the 64-bit version

vba 32 bit to 64 bit convert

 

Check VBA Version

#If VBA7 Then
    Msgbox "64 bit Version"
#Else
    msgbox "32 bit version
#End If

convert 32 bit VBA code into 64 bit VBA code

  1. Replace (Long) data type with (LongPtr) at all places in the scripts
This is 64 bit code 
Private Declare Function GetVersionEx Lib "kernel32" _
Alias "GetVersionExA" (lpVersionInformation As _
OSVERSIONINFO) As Long
This is 64 bit code after conversion 

Private Declare PtrSafe Function GetVersionEx Lib "kernel32" _
Alias "GetVersionExA" (lpVersionInformation As _
OSVERSIONINFO) As Long

 

Leave a Comment

Your email address will not be published. Required fields are marked *


Scroll to Top