Cpile error on 64 bit machine

Folks,
I am running Windows 7/64 and Office 2013/64
In Excel I'm following some provided code designed to help automated charts. When I enter in this code:
Sub declareI get his error:
compile errorMicrosoft's help was useless.
Frank FreeseAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Rory ArchibaldConnect With a Mentor Commented:
It's a pretty simple change to make it 32 and 64bit compatible:

#If Win64 Then
Declare PtrSafe Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long)
#Else
Declare Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long)
#End If

Open in new window

0
 
John HurstBusiness Consultant (Owner)Commented:
Office 64-bit does not interact well (or sometimes at all) with 32-bit applications surrounding it. Microsoft does not really recommend Office 64-bit at this point.

Do you have a machine with Windows 7 64-bit and Office 2013 32-bit that you can try.  I expect this will be the answer.
0
 
Frank FreeseAuthor Commented:
All my machines run 64 but Windows / Office
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
John HurstBusiness Consultant (Owner)Commented:
You are probably going to upgrade to 64-bit as suggested by the error message. I think your only alternatives are 64-bit code or 32-bit Office.
0
 
jkpieterseConnect With a Mentor Commented:
If you have more API function declarations to update so they work on 64 bit Office, check out my article on this:
www.jkp-ads.com/articles/apideclarations.asp
0
 
Frank FreeseAuthor Commented:
thanks folks
0
All Courses

From novice to tech pro — start learning today.