UtterAccess HomeUtterAccess Wiki

Welcome Guest ( Log In | Register )

Custom Search
Edit Discussion
> Is64BitOffice    


Is64BitOffice() Function

Returns a boolean value indicating whether or not the bitness of the VBA7 environment is 64 bit or not. This works because in a 64 bit VBA environment LongPtr resolves to a LongLong, where as in a 32 bit VBA environment, LongPtr resolves to a Long.



Where expression is of type String.

Public Function Is64BitOffice() As Boolean
' A result of True indicates the VBA7 environment is 64 bit.
' http://www.utteraccess.com/wiki/index.php/FunctionNameHere
' Code courtesy of UtterAccess Wiki
' Licensed under Creative Commons License
' http://creativecommons.org/licenses/by-sa/3.0/
' You are free to use this code in any application,
' provided this notice is left unchanged.
' rev  date        brief description
' 1.0  2014-04-15  Initial Release
#If VBA7 Then
   Dim lp As LongPtr
   Is64BitOffice = Not (VarType(lp) = vbLong)
   Is64BitOffice = False
#End If

End Function

Return Value



From the Immediate Window:


? Is64BitOffice()

Creative Commons License
Is64BitOffice by UtterAccess Wiki is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Editing and revision of the content is freely encouraged; for details, see Expected Usage.

Edit Discussion
Custom Search
Thank you for your support!
This page has been accessed 15,554 times.  This page was last modified 20:57, 15 April 2014 by Brent Spaulding.   Disclaimers