0% found this document useful (0 votes)
74 views1 page

Display VBA Editor Display Project Explorer Panel Run The Code

This document provides information about macros in VBA, including keyboard shortcuts to open the VBA editor and run macros, how to limit the scope of macros, and how to continue statements across multiple lines. It also summarizes the three types of code that can be included in a VBA module: declarations, sub procedures, and function procedures. To continue a statement across lines, end the first line with an underscore preceded by a space.

Uploaded by

caput85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views1 page

Display VBA Editor Display Project Explorer Panel Run The Code

This document provides information about macros in VBA, including keyboard shortcuts to open the VBA editor and run macros, how to limit the scope of macros, and how to continue statements across multiple lines. It also summarizes the three types of code that can be included in a VBA module: declarations, sub procedures, and function procedures. To continue a statement across lines, end the first line with an underscore preceded by a space.

Uploaded by

caput85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

View – Macros – Edit Alt + F11 Display VBA editor

Ctrl + R Display Project Explorer panel


F5 Run the code
Type “Private/Public” in front of Sub/Function in
a Module to make a subroutine to limit the
scope to a worksheet
Alt+F8 Shows macros
Ctrl+E/Ctrl+M Export module/Import module

In general, a VBA module can hold three types of code:


Declarations: One or more information statements that you provide to VBA. For
example, you can declare the data type for variables you plan to use or set some
other module-wide options. Declarations are basically housekeeping statements.
They aren't actually executed.
Sub procedures: A set of programming instructions that, when executed, performs
some action.
Function procedures: A set of programming instructions that returns a single
value (similar in concept to a worksheet function, such as SUM).

To continue a single line of code (also known as a statement) from one line to the
next, end the first line with a space followed by an underscore (_). Then continue
the statement on the next line. And don't forget the space. An underscore character
that's not preceded by a space won't do the job.

You might also like