
Develop Excel 2007 VBA macros from recording a macro to debugging, learn Excel object model, variables, control structures, and a user form that changes worksheet background color, and debugging tools.
Discover the Excel object model and how VBA controls the application, from adjusting the status bar to managing workbooks, worksheets, and ranges.
Master referencing the active workbook, active worksheet, and active cell in Excel VBA, and use offset to navigate cells. Grasp the Excel object model—Application, workbook, worksheet, range—for efficient coding.
Learn how to enable the developer tab in Excel 2007, access the macro environment, and use the record macro feature to design and refine your first macro with relative references.
Learn to configure macro trust in Excel by using the trust center, adjusting macro settings, and enabling digitally signed macros to protect your workbook from unauthorized code.
Record a macro in Excel to automate tasks by capturing keystrokes and movements; save it to this workbook or the personal macro workbook, then name, shortcut, and comment your code.
Open Visual Basic to access macros and select the first macro from the list. Run the macro to see its effect on sheet one, sheet two, and cell 2.
Record and edit your first macro in Excel 2007 with the VBA editor, assign a keyboard shortcut, and test active cell ranges across two windows.
Explore the VBA editor in Excel, mastering code windows, object browser, immediate and watch windows, and debugging tools to build and troubleshoot macros.
Configure the VBA editor to enforce explicit variable declarations, enable auto syntax checking, adjust indentation and fonts, and manage docking, grid, and compile on demand for efficient debugging.
Explore the project explorer to see how worksheets and the workbook organize code, why modules are preferred for macros, and how a macro creates module 1 automatically.
Explore the properties window to rename modules, adjust sheet properties like visibility and names, and control workbook elements directly from the VBA editor, then move into the code environment.
Explore the object and procedure drop-downs in Excel 2007 VBA, selecting general or audience objects on worksheets or user forms, and open modules, macros, properties, and the code environment.
Learn to use the immediate window in Excel VBA to test functions and variables, evaluate expressions with a question mark, inspect values, and even modify variables on the fly.
Open the object browser to view options and code, and explore the library for macros like add me and first macro, then leverage the object model's properties, methods, and events.
Learn the difference between procedures and functions in VBA, and how public and private scope controls macro visibility and function return values.
Learn how to dimension variables with the dim statement in Excel VBA, declaring string, integer, long, double, date, and boolean types. Understand quotes for strings and how overflow errors occur.
Master object variables in Excel VBA by declaring ranges, worksheets, and workbooks as objects within the Excel object model, and use single-character prefixes with meaningful names for readability.
Explore how variables are scoped within functions, subs, and modules in VBA. Understand option explicit, module variables, and public or private declarations for memory and access.
Document your code with authorship, modification date, and purpose, and declare all variables at the top. Use apostrophe comments to explain logic and the debug toolbar to quickly comment blocks.
Use the const keyword to define constants that never change, for dropdown option values like 0, 1, and 2, giving them meaningful names and restricting their scope to where defined.
Declare variables, set and combine first and last names using concatenation, and manage string versus integer operations in Excel VBA, highlighting ampersand versus plus for safe concatenation.
Learn to create a public VBA function in Excel that accepts a date argument to calculate age, and explore function versus subroutine and variable scope.
Utilize the input box function in VBA to prompt for data, specify a title, default, and location, assign the result to a variable, and note its lack of validation.
Explore how the MsgBox in Excel 2007 VBA functions as both a procedure and a function, customizing buttons, icons, and defaults for prompts and debugging.
Explore string functions in Excel 2007 VBA, including left, right, mid, and InStr, to extract and parse names using string operations and trim.
Explore date functions in Excel 2007 VBA, including current date, month, weekday, and date conversion with date, now, and cdate; use inputbox and messagebox for date input validation.
Master conditional logic in Excel VBA using if/then/else and select case, with functions that take arguments and return strings, and enforce one entrance and one exit in macros.
Use select case statements in Excel VBA to replace nested ifs for testing multiple orders or conditions, including case else and ranges, for clearer and faster branching.
Master if statements in VBA using equals, less than, greater than, greater than or equal to, less than or equal to, and not equal to; learn booleans and zero defaults.
Explore creating for/next loops in Excel VBA to iterate through rows, using variables, boundaries, and optional steps, with offsetting from the active cell to fill cells.
Learn how to implement do loops in Excel VBA, including loop variables, do until conditions, and using offset with the active cell, while avoiding infinite loops.
Explore Excel VBA control structures by creating while/wend loops, for next loops, and do loops; call routines, manage conditions with if-then-else and select case.
Create and customize user forms to build a practical interface for Excel VBA macros, enabling file selection and input validation to ensure usable data.
Explore how excel 2007 vba user forms use controls like frames, radio buttons, text boxes, combo boxes, list boxes, and command buttons, with container behavior and naming conventions for code.
Explore properties, methods, and events via the property window, and learn to set a form's background color with code—red, green, or white—using on-load events and simple edits.
Ensure every form control has a unique name and a clear naming convention. Use Me to reference controls via the dot and set properties like caption for responsive UI.
Explore responding to events in Excel 2007 VBA by wiring a button click to unload a form, use cancel and default properties, and change worksheet color via select case.
Create a public sub to open the color chooser form from a macro. Use show with modal to keep the form topmost until the user selects blue, green, or red.
Name each control as you add it to a form and use a consistent naming convention. Leverage various form controls and enable screen updating to speed up code and debugging.
Learn to debug Excel 2007 VBA by identifying syntax and logic errors, using debug and compile, and building a comprehensive test routine to catch issues, including a missing reference.
Run macros from the VBA editor using F5 or the run button. Test a function in the immediate window by prefixing it with a question mark and selecting an option.
Place a breakpoint in Visual Basic to stop execution and inspect a function; you cannot set one on declarations, but use the left margin magenta line or red circle.
Learn to debug Excel VBA macros by stepping through code, using breakpoints, and verifying function returns, while diagnosing a logic error where a function returns nothing.
Learn to debug VBA code by using a watch and breakpoints to monitor loop variables, set break conditions, and view values in the watch window and the immediate window.
Learn to implement a robust error trap in Excel VBA using on error goto and a named error trap, display messages via message boxes, and gracefully resume or exit routines.
Master Excel VBA fundamentals by building macros and understanding application, workbook, worksheet, and range objects with active sheets and cells. Learn variables, Dim, control structures, loops, and debugging with breakpoints.
This course introduces you to Excel macro programming using Microsoft's Visual Basic for Application (VBA). The overall focus of this course is to teach you proper Visual Basic programming techniques along with an understanding of Excel's object structure. Other topics in this course include; recording macros, programming basics, proper variable declaration, Visual Basic functions, control structure use, looping, and Userform creation. The final section deals with the debugging tools included in the Microsoft VBA editor and methods on how to effectively use them.