convert excel vba code from 2003 version to 2007

Posted on 2011-03-03
Last Modified: 2013-11-26
I have an excel 2003 form with extensive VBA code and forms.  My agency is upgrading to Windows 7 with Office 2007.  My code doesn't work with Excel 2007.  Where can I go to learn the coding differences between Excel 2003 and Excel 2007.

I have found examples of specific code changes here on the forum - but, I can't find a general guide on what changes are necessary.  I need to start somewhere and have no idea where to look!
Question by:shaneaustex
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 85

Accepted Solution

Rory Archibald earned 250 total points
ID: 35028009
Most code should work the same. Application.Filesearch has been removed (well, disabled) but other than that it's mostly stuff that has been added. The chart engine has changed but is, at least in theory, backward compatible although it has some strange quirks. What sort of problems have you run into?
LVL 22

Assisted Solution

rspahitz earned 250 total points
ID: 35028148
Yeah, the only problems I had were where I made calls to the 32-bit version in a Declare statement; it didn't work on the 64-bit version and I didn't know what the 64-bit signature looked like.  I guess I should check for that.
LVL 85

Expert Comment

by:Rory Archibald
ID: 35028222
That would be 2010 rather than 2007, though?
Mostly just adding PtrSafe and converting any longs that refer to memory addresses to LongPtr.
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 22

Expert Comment

ID: 35028528
Thanks Rory...I'll open up a separate question for you to help with that...
LVL 22

Expert Comment

ID: 35028666
I added this question for myself...linking it here since Shane might also find it useful

Author Comment

ID: 35028857
I confirmed that my agency is going to Office 2007.  I am hoping there is a guide somewhere that explains the difference - then I could go through my code line by line and look for what needed to be changed...

This is difficult for me to trouble shoot while I'm at work (I'm a cop and only have my issued laptop with Office 2003).  So, I have to wait till I can get home and open the document in Office 2007 to explain the issues.  I was hoping I could locate a guide online, make the changes while I'm at work, and troubleshoot the changes at home.....
LVL 85

Expert Comment

by:Rory Archibald
ID: 35028967
Excel 2007 Help will tell you what's new but, to be honest, most of the code I have seen breaking, should not break - it's often chart related, and the fix usually involves turning screenupdating back on while processing the chart.
LVL 101

Expert Comment

ID: 35275413
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
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…

705 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