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

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…

Contents