Understanding named arguments and optional arguments
When you call a Sub or Function procedure, you can supply arguments positionally, in the order that they appear in the procedure's […]
Using arrays
You can declare an array to work with a set of values of the same data type. An array is a single […]
Using constants
Your code might contain frequently occurring constant values, or might depend on certain numbers that are difficult to remember and have no […]
Using data types efficiently
Unless otherwise specified, undeclared variables are assigned the Variant data type. This data type makes it easy to write programs, but it […]
Using events with the Application object
Before you can use events with the Application object, you must create a class module and declare an object of type Application with events. For […]
Using For Each...Next statements
For Each...Next statements repeat a block of statements for each object in a collection or each element in an array. Visual Basic […]
Using the Add-In Manager
Use the Add-In Manager dialog box to load or unload an add-in. If you close only the visible portions of an add-in—by […]
Using parentheses in code
Sub procedures, built-in statements, and some methods don't return a value, so the arguments aren't enclosed in parentheses. For example: MySub "stringArgument", […]
Using With statements
The With statement lets you specify an object or user-defined type once for an entire series of statements. With statements make your […]
Using Do...Loop statements
Use Do...Loop statements to run a block of statements an indefinite number of times. The statements are repeated either while a condition […]
Using For...Next statements
Use For...Next statements to repeat a block of statements a specific number of times. For loops use a counter variable whose value […]
Using If...Then...Else statements
Use the If...Then...Else statement to run a specific statement or a block of statements, depending on the value of a condition. If...Then...Else […]