UtterAccess HomeUtterAccess Wiki

Welcome Guest ( Log In | Register )

Custom Search
Edit Discussion
> Is64BitOffice    

Contents

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.

Syntax

CODE
Is64BitOffice()

Where expression is of type String.

CODE
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)
#Else
   Is64BitOffice = False
#End If

End Function

Return Value

Boolean.

Example

From the Immediate Window:

CODE

? Is64BitOffice()
True


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