Solved

Cpile error on 64 bit machine

Posted on 2014-09-29
6
70 Views
Last Modified: 2014-09-30
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.
0
Comment
Question by:Frank Freese
6 Comments
 
LVL 92

Expert Comment

by:John Hurst
ID: 40351267
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
 

Author Comment

by:Frank Freese
ID: 40351275
All my machines run 64 but Windows / Office
0
 
LVL 92

Expert Comment

by:John Hurst
ID: 40351301
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 85

Accepted Solution

by:
Rory Archibald earned 350 total points
ID: 40351626
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
 
LVL 11

Assisted Solution

by:jkpieterse
jkpieterse earned 150 total points
ID: 40351670
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
 

Author Closing Comment

by:Frank Freese
ID: 40352104
thanks folks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now