From the course: Excel: Learning VBA
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
Create, export, and delete code modules - Microsoft Excel Tutorial
From the course: Excel: Learning VBA
Create, export, and delete code modules
- [Instructor] Code modules store the VBA instructions you write to automate Excel. In this movie, I will show you how to work with those modules in your macro-enabled workbooks. My sample file is 01_05_Modules, and you can find it in the Chapter 1 folder of the Exercise Files collection. This workbook has a single worksheet with some data in it, but I'm actually more interested in the Visual Basic Editor, so I'll press Alt + F11 to move there. In the Visual Basic Editor, you'll see that over on the side I have the Project window or Project Explorer and I just have objects for Sheet1 and this workbook. I'd like to create a code module that I can use anywhere within this workbook. To do that, I will go to the Insert menu and then click Module, and that displays a blank code module that I can use to create my VBA routine. So, I'll just type a quick one here, I'll just call it Sub HelloMessage and then open and close…
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)
Introduce object-oriented programming3m 2s
-
(Locked)
Examine the Excel object model4m 14s
-
(Locked)
Work in the Visual Basic Editor6m 27s
-
(Locked)
Set VBA project properties4m 28s
-
(Locked)
Create, export, and delete code modules5m 54s
-
(Locked)
Create a subroutine3m 28s
-
Create a function5m 2s
-
(Locked)
Add comments to your code4m 47s
-
Run a VBA procedure5m 20s
-
(Locked)
Add code to a recorded macro3m 48s
-
(Locked)
-
-
-
-
-
-
-