Excel Macros Tutorial
The Course on Excel Macros (VBA)
Click on the image to the left to
Reviewed and improved each year
Covering Excel 1997 to 2012
You will find on this website an introduction to each of the 33 lessons of the
Dowloadable Course on Excel Macros
- Lesson 1: Visual Basic Editor in Excel (VBE)
- Lesson 2: Project Window in the Visual Basic Editor
- Lesson 3: Properties Window in The Visual Basic Editor
- Lesson 4: Code Window in the Visual Basic Editor
- Lesson 5: Building Macros in Excel
- Lesson 6: Testing Macros in Excel
- Lesson 7: Macro Recorder in Excel
- Lesson 8: Macros Help and Assistance
- Lesson 9: Events in VBA for Excel
- Lesson 10: Security and Protection In VBA for Excel
- Lesson 11: VBA Coding Tips
- Lesson 12: Working with Errors
- Lesson 13: Working with the Application
- Lesson 14: Working with Workbooks
- Lesson 15: Working with Worksheets
- Lesson 16: Range and Cells
- Lesson 17: Message Boxes in VBA for Excel
- Lesson 18: Excel VBA Vocabulary to Filter and Sort Data
- Lesson 19: Working with Variables
- Lesson 20: Working with Statements
- Lesson 21: Working with Functions
- Lesson 22: Working with SQL and External Data
- Lesson 23: Working with other programs in VBA for Excel
- Lesson 24: Userforms in VBA for Excel
- Lesson 25: Userform Properties and VBA Code
- Lesson 26: Labels in VBA for Excel
- Lesson 27: Text Boxes in VBA for Excel
- Lesson 28: Command Button in VBA for Excel
- Lesson 29: Combo Boxes in VBA for Excel
- Lesson 30: List Boxes in VBA for Excel
- Lesson 31: Check Boxes, Frames and Option Buttons
- Lesson 32: Spin Buttons
- Lesson 33: Image Controls
Up to Excel 2007 you didn't need to install the Visual Basic Editor if you wanted to develop macros (VBA procedures). In Excel 2007 you must specify that VBA be installed when you install Excel from the Office CD. See how to install Visual Basic for Application for Excel 2007.
In Excel 2010 this problem has been corrected and you do not need to install anything extra to work with macros. YOu might have to make the "Developer" ribbon visible by right clicking on the "Home" item of the menu bar and then selecting "Customize the ribbon..." and making sure that the "Developer" ribbon is checked.
In Excel 2007 and 2010 you save your spreadsheets that do not contain macros in .xlsx format and those with macros in .xlsm format. You can also select to save your spreadsheets in .xls format so that people who have not migrated to Excel 2007 or 2010 can open and use them.
All macros and VBA procedures developed in Excel 1997 to 2003 will work in Excel 2007 and 2010 except for a few minor changes:
- a function used only by advanced users " FileSearch" does not exist anymore. It can be easily replaced by " Dir" that runs in Excel 2007, 2010 and in earlier versions of Excel.
- Advanced users of Excel 2007 and 2010 who import external data with or without SQL might want to add these two lines of code at the end of the refresh process:
- Use the macro recorder to discover the new syntax to cells' background, font colors, filtering and sorting data.
Nothing else has changed in Excel 2007 and 2010 as far as VBA and macros are concerned.
The macro recorder and the Visual Basic Editor are the same.
The powerful functions, functionalities and macros that people used in Excel 1997 still work in Excel 2003, 2007 and 2010. Anything new that you learn about Excel will remain useful for years to come.
What has changed about theses functions, functionalities and macros is that they work much faster with every new version of Excel.
What has changed even more is the computer on your desk. It has changed dramatically.
- Your computer is hundreds of times faster and more powerful than in 1997.
- Your computer is also connected to multiple sources of data within your enterprise.
- Your computer is connected to data sources from around the world through the Internet.
Due to these changes to Excel, your computer and its network, Excel has become limitless as a data analysis and reporting program.