From the course: Excel: Learning VBA
Unlock the full course today
Join today to access over 24,300 courses taught by industry experts.
Challenge: Use Excel events in your VBA code - Microsoft Excel Tutorial
From the course: Excel: Learning VBA
Challenge: Use Excel events in your VBA code
(upbeat music) - [Instructor] Now that we've reached the end of the chapter, I wanted to present you a couple of challenges about using Excel events in your VBA code. Specifically, I want you to run a procedure when you open a workbook. However, I have a little surprise for that, so you won't be writing code as normal. Instead, I'm asking you to find it within the workbook. Also, I'll have you run a procedure when you close a workbook. And finally, to trigger a procedure using a specific key sequence. And as always, there are three elements to the challenge. First, prepare by reading the comments in each code module, then create your solution. And finally, test your code to make sure that it runs as expected. Right, with all that in mind, I'm going to switch, not to Excel, but instead to Windows Explorer. I have displayed the exercise files collection chapter seven folder, and I will double-click Challenge.xlsm to…
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)
-