Solved

Cpile error on 64 bit machine

Posted on 2014-09-29
6
65 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 90

Expert Comment

by:John Hurst
Comment Utility
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
Comment Utility
All my machines run 64 but Windows / Office
0
 
LVL 90

Expert Comment

by:John Hurst
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 85

Accepted Solution

by:
Rory Archibald earned 350 total points
Comment Utility
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
Comment Utility
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
Comment Utility
thanks folks
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
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 will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

771 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

11 Experts available now in Live!

Get 1:1 Help Now