
Learn the essentials of Excel 365 VBA, the Visual Basic for Applications language that automates tasks, using variables, conditional logic, strings, loops, and user forms.
Enable the developer tab, access Visual Basic, and manage macros, from recording to editing and running, while understanding relative reference options and macro security practices.
Open the VB Editor from the developer tab to edit macros in this workbook, create a first macro named Sub FirstMacro with MsgBox Hello World, and save as xlsm.
Record a macro in Excel using the macro recorder to generate VBA and edit it in the Visual Basic Editor, with Personal.xlsb storing the macro for universal access.
Master the elements of the VBA language by examining objects, collections, properties, and methods; learn how dot notation and optional parameters drive actions like copy and paste.
Explore how VBA methods work, including required and optional parameters, with practical examples like application.quit and Worksheets.Add. Learn how to specify parameters using after:= and activesheet to control sheet insertion.
Use comments in VBA to temporarily disable code and document logic, using single quotes or end-of-line comments. Employ the edit toolbar's comment block to manage large code sections efficiently.
Learn to use the VBA range property for single, connected, and unconnected cells, and manipulate values. Explore the worksheets collection to reference sheets by name, number, or active sheet.
Add a macro button to a spreadsheet to run macros with one click. Create a button from the developer tab, assign a macro, and adjust its text and size.
Learn how to combine ActiveCell with the Range object in Excel VBA to build flexible ranges, starting at the ActiveCell and extending to a fixed end like C5.
Explore the offset property to refer to cells relative to the active cell for flexible macros, using ActiveCell.Offset with positive, negative, and range references like A1:B1 in VBA.
Declare variables with dim for texts, numbers, or dates, and an integer type; assign values, display in a message box, and use control space to auto-complete descriptive names.
Learn to use integer variables in Excel VBA by assigning MyNumber to 10, displaying it in the active cell, and why always using dim avoids slow variant data types.
Learn how option explicit improves VBA by enforcing explicit variable declarations, preventing typos, and easing debugging. Use auto-complete (Ctrl+Space) to ensure variable names are spelled correctly in Excel 365 VBA.
Explore common VBA variable types in Excel 365, from boolean and integer to long, single, double, variant, and string, learn how to dim variables, defaults, overflow risks, and performance implications.
Learn how the VBA if statement tests a condition, uses then and end if, and executes code such as showing a message box when a cell equals 10.
Master the else clause in VBA by pairing it with an if statement to handle true and false parts, using message boxes to verify cells contain 10.
Learn to use else if in VBA to test multiple conditions within a single if block, with optional else and end if, using examples like 10 and 11.
Explore six conditional operators in Excel 365 VBA, applying them to numbers, dates, and text, and use the ampersand to concatenate values with text and tailor messages to each operator.
Master not, and, or operators in Excel 365 VBA to build conditional logic and validate values, using active cell inputs to test ranges like between 20 and 30.
Explore nested if statements in VBA, prioritizing indentation and documentation, and use and if logic to trigger message boxes for ranges such as 20–30 and 20–25, with thorough testing.
Explore the select case structure in Excel 365 VBA, replacing if then else with case values and ranges, including ten, eleven, ten to twenty, and ending with end select.
Explore Excel 365 VBA techniques to streamline code using with and end with, applying multiple font properties to a single activecell with dot notation for better readability.
Explore string variables in Excel VBA, assign text with quotes, treat numbers as strings, write to cells, retrieve with ActiveCell.Value, and display results in a message box.
Learn to convert text to lowercase or uppercase using LCase and UCase in Excel VBA, with a practical example updating B2 and C2 from A2.
Explore len and trim in Excel and VBA to measure text length and remove leading or trailing spaces, with a practical A2 example.
Explore left, right, and mid string functions in Excel VBA to extract substrings, split zip codes, and pull area codes from phone numbers with explicit length and start positions.
Harness loops in Excel VBA to automate tasks, using for next, for each, do until, and do while across lists, sheets, pivot tables, charts, and files, while avoiding endless loops.
Use a for next loop in VBA from a start to end number, optionally exiting early, and loop through sheets with sheets.count while showing progress with message boxes.
Explore the for each loop in Excel VBA, iterating over collections like worksheets, workbooks, and ranges with an object variable, and display each member's name using a message box.
Demonstrate using the cells property in vba as a flexible alternative to the range object, with r1c1 notation, looping from a start to an end number, and filling values.
Master the do until loop in Excel VBA to traverse a list with a terminating condition, optionally exit via an if statement, and move down using activecell.offset.
Learn the do while loop and its relation to do until, with active cell and offset syntax. Practice doubling values in column k and save before running.
Practice using exit sub to prematurely end a VBA sub based on a numeric check with IsNumeric, display a MsgBox, and conditionally call other macros or formatting routines.
Explore how to create flexible message boxes in Excel VBA, using yes/no buttons, graphics, and custom titles. Learn to handle user responses with if statements, default buttons, and yes/no outcomes.
Learn how to collect data with an input box in Excel VBA, using prompts and a title, store it in a variable, and drive actions with defaults and if statements.
Create and use a user-defined VBA function in Excel by declaring a name, arguments, and end function, illustrated with a volume example.
Learn to use object variables for ranges and sheets in Excel VBA, using the Set command to assign memory-resident objects and simplify your code.
Compare input box to user forms and demonstrate creating a user form in the Visual Basic editor, adjusting properties, naming conventions like frm, and previewing with the run button.
Learn to add and configure form controls (labels, text boxes, combo boxes, list boxes, check boxes, option buttons with frames) and populate a dept dropdown from a named table.
Use a user form to collect name and department and write them to A2 and B2 via the cmdNameDept button. Close the form with me.hide and show a message box.
Learn how to launch an Excel user form easily by adding a button, quick access toolbar item, or an auto_open macro that shows the form (frmNameDept.Show) when the file opens.
Identify and fix syntax, run time, and logic errors in VBA; use error messages, end if, option explicit, and improve debugging with indentation, comments, macro recorder, and tools.
Step through your Excel VBA macro line by line to understand, debug, and edit code, using step into, step over, and step out in debug mode.
Master breakpoints in Excel VBA to stop code at a chosen line for debugging, toggle on/off with a click or F9, and step through to isolate the sort operation.
Explore the immediate window in the Visual Basic Editor to test single lines and run macros with Enter. Inspect values with the value property, and count sheets with Sheets.count.
Learn to debug VBA code with the locals window, inspect variables while stepping through loops, diagnose run-time overflow, and use rounding and the immediate window for quicker fixes.
Learn to handle Excel VBA errors with the Err object, using On Error Go To bottom, checking Err.Number for type mismatch and overflow, and guiding users with conditional message boxes.
Access built-in Excel VBA help to learn code examples for workbooks and worksheets. Copy and adapt sample macros, like a table of contents, to automate tasks.
Use control-space to auto complete objects, properties, methods, macros, and parameters, and indent code with clear begin and end markers plus liberal comments to improve readability.
This course will teach students proper Visual Basic programming techniques along with an understanding of Excel’s object structure. Students will learn how to work with variables, how to use various conditional logic statements such as If and Else, and how to work with string functions. Students will also learn how to work with various loops such as next loops and each loops, as well as how to create user forms. Finally, students will get an in-depth understanding of the debugging tools available and how to effectively debug their code.
Course Updated: 08/10/2021
With nearly 10,000 training videos available for desktop applications, technical concepts, and business skills that comprise hundreds of courses, Intellezy has many of the videos and courses you and your workforce needs to stay relevant and take your skills to the next level. Our video content is engaging and offers assessments that can be used to test knowledge levels pre and/or post course. Our training content is also frequently refreshed to keep current with changes in the software. This ensures you and your employees get the most up-to-date information and techniques for success. And, because our video development is in-house, we can adapt quickly and create custom content for a more exclusive approach to software and computer system roll-outs.
This course aligns with the CAP Body of Knowledge and should be approved for 5 recertification points under the Technology and Information Distribution content area. Email info@intellezy.com with proof of completion of the course to obtain your certificate.