Introduction
Dive into using VBA in Excel
()
What you should know
()
1. Visual Basic for Applications
Introduce object-oriented programming
()
Examine the Excel object model
()
Work in the Visual Basic Editor
()
Set VBA project properties
()
Create, export, and delete code modules
()
Create a subroutine
()
Create a function
()
Add comments to your code
()
Run a VBA routine
()
Add code to a recorded macro
()
2. Defining Variables, Constants, and Calculations
Define arrays
()
Introduce Excel VBA data types
()
Declare variables and require declaration before use
()
Manage variable scope
()
Define static variables and constants
()
Create a calculation using mathematical operators
()
Define and use object variables
()
Streamline code references using With…End With statements
()
3. Adding Logic to Your VBA Code
Repeat a task using a For...Next loop
()
Step through all items of a collection using a For...Each loop
()
Repeat a task using a Do loop
()
Perform a task when conditions are met using an If...Then statement
()
Select which action to take using a Case statement
()
4. Debugging Your VBA Code
Manage errors using On Error statements
()
Step through a subroutine or function
()
Set breakpoints in your code
()
Verify output using the Immediate window
()
Watch a value in a routine
()
5. Managing Workbook Elements and Data in VBA
Write a value to a cell
()
Cut, copy, and paste cell data
()
Find values in cells
()
Refer to cells using the OFFSET function
()
Concatenate text strings
()
Return part of a string
()
Manage worksheets with VBA
()
Manage workbooks with VBA
()
6. Adding Advanced Elements to Your Workbook
Turn off screen updating when you run a macro
()
Use worksheet functions in a macro
()
Acquire values using an input box or message box
()
Call a subroutine from another subroutine
()
7. Using Excel Events in Your VBA Code
Run a procedure when you open, close, or save a workbook
()
Run a procedure when a cell range changes
()
Trigger a procedure using a specific key sequence
()
8. Putting It All Together
Apply techniques in a capstone project
()
Conclusion
Further information
()
Ex_Files_Learning_VBA_Excel.zip
(1.0 MB)
Glossary_LearningVBAExcel.zip
(100 KB)