Alex & Access

April 16, 2014

How to detect, if you are running 64-bit Office

Filed under: Access 2010, Access 2013 — access @ 10:54 am

New data type LongPtr is Long integer on 32-bit systems and LongLong integer on 64-bit systems, by checking it VarType you can find out on what environments you run your VBA code:

Function Is64BitOffice() As Boolean
    Dim lp As LongPtr
    Is64BitOffice = Not (VarType(lp) = vbLong)
End Function

This trick I learned from fellow MVP Brent Spaulding

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: