Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specs.xlsm fails to compile on 64bit Excel #18

Open
jrwagz opened this issue Dec 12, 2016 · 1 comment
Open

Specs.xlsm fails to compile on 64bit Excel #18

jrwagz opened this issue Dec 12, 2016 · 1 comment

Comments

@jrwagz
Copy link

jrwagz commented Dec 12, 2016

I was running the Specs.xlsm sheet in Excel 2010 64bit (14.0.7015.1000) on Windows 7 and ran into the warning about the Declare Functions needing the PtrSafe attribute.

Here is the change for the PreciseTimer class that fixes this issue:

Option Explicit

#If Mac Then
Private pStartTime As Single
#Else
#If VBA7 Then
Private Declare PtrSafe Function QueryPerformanceCounter Lib "kernel32" (lpPerformanceCount As LARGE_INTEGER) As Long
Private Declare PtrSafe Function QueryPerformanceFrequency Lib "kernel32" (lpFrequency As LARGE_INTEGER) As Long
#Else
Private Declare Function QueryPerformanceCounter Lib "kernel32" (lpPerformanceCount As LARGE_INTEGER) As Long
Private Declare Function QueryPerformanceFrequency Lib "kernel32" (lpFrequency As LARGE_INTEGER) As Long
#End If
@timhall
Copy link
Member

timhall commented Apr 7, 2018

Thanks, I'll make these fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants