Solved

Cpile error on 64 bit machine

Posted on 2014-09-29
6
71 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 93

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 93

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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 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