From the course: Excel: Learning VBA
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
Run a procedure when you open, close, or save a workbook - Microsoft Excel Tutorial
From the course: Excel: Learning VBA
Run a procedure when you open, close, or save a workbook
- [Instructor] When you create a business solution using Excel macros, you gain the ability to influence your user's actions. For example, you can display a welcome message when a workbook opens, verify a workbook's integrity before it's closed, and examine contents before a workbook is saved. Each of these event handling routines helps to ensure your workbook will function the way you want it to. In this movie, I will show you how to create events for several different scenarios, when you open, close, or save a workbook. I don't have any files open yet, but what I will do is in the Chapter Seven folder of the Exercise Files collection, double click 0701, Manage Events. So I'll double click there to open it. Excel starts. And you can see that a macro ran right when the workbook opened. And it says "Welcome to the commission tracking workbook." To close the message box, I'll click OK. So the question is, how did that…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Run a procedure when you open, close, or save a workbook5m 35s
-
(Locked)
Run a procedure when a cell range changes5m 37s
-
(Locked)
Trigger a procedure using a specific key sequence3m 48s
-
(Locked)
Challenge: Use Excel events in your VBA code3m 9s
-
(Locked)
Solution: Use Excel events in your VBA code3m 30s
-
(Locked)
-