Microsoft Visual Basic for Applications (VBA) is essentially the same in Excel 2003 as it is in Excel 2007. If you open your Excel 2003 file (XLS) and save it as an Excel 2007 file (XLSX), the macros should transfer over intact. If they don't, it isn't because your code has failed to convert. One of two things has happened: either you haven't set the macro settings in Excel 2007, or your workbook (not the code itself) is corrupt. A workaround for the problem is to save the macros as text files and transfer them over individually from Excel 2003 to Excel 2007.
- Skill level:
Other People Are Reading
Click on the "Office" Button.
Select "Excel Options."
Choose "Trust Center->Trust Center Settings->Macro Settings."
Click on "Trusted Locations->Add New Trusted Locations."
Add your workbook's location and then select "OK."
Open the workbook again in Excel 2007 and check for working macros. If they still don't work, you'll need to copy and paste the macro text over (see Section 2).
Open the workbook in Excel 2003.
Locate the code for your macro. An easy way to locate code for a particular macro is to click on the "Tools" menu, and then "Macro->Macros." Find the macro name and then click "Edit."
Highlight the entire section of code and then press "Ctrl" and "C."
Paste the text into a text file (using a program like Notepad or Wordpad).
Open the VBE in Excel 2007 and paste the code into a new code window.
Tips and warnings
- A shortcut to opening the VBE window is to press "Alt" and "F11" together.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for