News, links, downloads, tips and tricks on Microsoft Access and related

About Me Search
Name:Alex Dybenko

Location:Moscow, Russia

Wednesday, April 16, 2014

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

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

Labels: , ,


Blogger Unknown said...


6:31 AM  
Anonymous Anonymous said...

Doesn't work for me. It Errs?!

7:27 PM  
Blogger Alex Dybenko said...

It should work on Access 2010 or 2013...

8:54 AM  

Post a Comment

<< Home