64-bit Unsigned Integers in VBA
There is no native 64-bit unsigned integer data type in VBA. In practice, this is rarely an issue. But "rarely" is not the same as "never." To take advantage of certain Windows API calls, you'll need a workaround. 64-bit Unsigned Integers in VBA Option Compare Database Option Explicit 'Inspired by: https://stackoverflow.com/a/48626253/154439 (h/t Charles Williams) #If VBA7 Then Private Declare PtrSafe Sub CopyMemory Lib "Kernel32.dll" Alias "RtlMoveMemory" ( Destination As Any , Source As Any , ByVal Length As LongPtr ) #Else Private Declare Sub CopyMemory Lib "Kernel32.dll" Alias "RtlMoveMemory" ( Destination As Any , Source As Any , ByVal Length As Long ) #End If #If Win64 Then Declare PtrSafe Sub GlobalMemoryStatusEx Lib "kernel32" ( lpBuffer As MEMORYSTATUS ) Private Type LARGE_INTEGER LowPart As Long Hig...