top of page

Where do I Paste VBA Code

There are 3 places that you can put your VBA code that you’ve written or got from the Internet:

General module

Sheet module

ThisWorkbook module

UserForm module

Class module

General Modules:

This is where you paste regular macros/codes as well as User Defined Functions (UDFs) and variables

ThisWorkbook/Sheet Modules:

Paste event macros here, found in the ‘Microsoft Excel Objects Folder’

UserForm Modules:

This is were you can paste event codes and also call procedures from General modules

Class Modules:

Found in the ‘Class Modules’ under ‘Microsoft Excel Objects’ and ‘Modules’

For more information on Class Modules visit

Open VBA Editor

There are two ways of opening the VBA editor

Easiest method id using the shortcut Alt+F11

The other way is go to the ‘Developer’ tab on the Ribbon and then click Visual Basic, to enable the Developer Ribbon click here - https://msdn.microsoft.com/en-AU/library/bb608625.aspx

Insert Modules

To insert a module you can either right click on your VBA project in the VBA Editor, hover your mouse on ‘Insert’ then select the appropriate or click on Insert in the menu bar and select the appropriate.

Search By Tags
No tags yet.
Featured Posts
Recent Posts
Follow Me
  • Facebook Classic
  • Twitter Classic
  • Google Classic
bottom of page