In my last post, VBA Version 7 Daniel, author of Daniel’s XL Toolbox, commented that he had not come across anything untoward with the “new!” version of VBA, and reported, so far, all is well with his addin – good news! Then JP from Code For Excel & Outlook, pointed to a VBA Compatibility tool (tool, info) from MS – thanks JP, I think this is called team work! ;-)
Anyway, I believe the major update might be support of 64 bit types in VBA? I’m not running a 64 bit OS to test, but I found this:
Excel 2010 can load much larger workbooks. Excel 2010 made updates to use 64-bit memory addressing in order to move beyond the 2-GB addressable memory boundary that limits 32-bit applications.
The down side of this is:
Visual Basic for Applications (VBA) VBA code that uses the Declare statement to access the Windows application programming interface (API) or other DLL entry points will see differences between 32-bit and 64-bit versions. The Declare statement must be updated with the PtrSafe attribute after inputs and outputs to the API have been reviewed and updated. Declare statements will not work in 64-bit VBA without the PtrSafe attribute. New data types are added to 64-bit Office 2010 VBA: LongLong and LongPtr. For more information about VBA, see the “64-bit VBA Overview” and “Declare Statement” articles in the Microsoft Visual Basic for Applications online Help in Office applications.
So if your using API calls in you VBA, and you hit a 64 bit versions, you could be about to hit some issue. Doesn’t sound like the fix will be to hard though, but we’ll wait and see eh!
Bonus thought: Does this mean the C API has been updated too?
Related posts:
[...] is all abuzz about 64-bit Excel. Read about it at 64 bit VBA. Turns out there are some important changes that developers need to be aware of if they want to [...]
Hey there Ross,
There’s also another thing to worry about when moving to 64bit Office. To my understanding (granted not tested yet), any 32bit ActiveX controls will show as boxes with red x’s in the 64bit version of office, and I’d assume the vice versa. The controls aren’t compatible back and forth.
Hi Ken, yeah that right, any 32 com code wont run in a native 64 app, or OS, but, Office might allow for that and add different compatible types other wise that is going to be a massive issue.
Someone needs to look into this – where’s the information from MS?!!
And like you say – “As I understand it” dont know too much to sure/100%!
You also need to update the delcarations of API statements, see:
http://www.jkp-ads.com/articles/apideclarations.asp