Problems with 64-bit Excel 2010 and API Calls

ransomedbyfire

Board Regular
Joined
Mar 9, 2011
Messages
121
I am trying to edit some VBA written a while back using API calls to an investment program to make it compatible with Excel 2010 64-bit. I have replaced all the "long" types with "longptr" and added "ptrsafe" to the functions where needed. But now, I am getting type mismatch errors on some of the functions that take long type data for an argument. Why is this happening? Is it possible that the API call just doesn't know what to do with LongPtr data because it was written a long time ago? How can I get around this?
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Not all longs should be changed - only those that refer to memory addresses.
 
Upvote 0
Thanks, rorya.

I forgot to mention, I tried declaring the trouble-making items as variables, and the code still didn't work. But I'll look further into the information you provided.
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,299
Members
452,904
Latest member
CodeMasterX

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top