Skip to main content
Excel Macro: Copy and Paste a Range
One of the most common action you’ll need to learn is copying and pasting a range of data. It’s very easy to […]
Calling property procedures
The following table lists the syntax for calling property procedures: Property procedure Syntax Property Let [ object.] propname (arguments)] = argument Property […]
Excel Macro: Hide All Subtotals in a PivotTable
This simple macro hides all subtotals in the specified PivotTable. Tips You can manually hide all subtotals at once by going to […]
Calling Sub and Function procedures
To call a Sub procedure from another procedure, type the name of the procedure and include values for any required arguments. The […]
Creating object variables
You can treat an object variable exactly the same as the object to which it refers. You can set or return the […]
Creating recursive procedures
Procedures have a limited amount of space for variables. Each time a procedure calls itself, more of that space is used. A […]
Declaring variables
When declaring variables, you usually use a Dim statement. A declaration statement can be placed within a procedure to create a procedure-level […]
Declaring arrays
Arrays are declared the same way as other variables, by using the Dim, Static, Private, or Public statements. The difference between scalar […]
Declaring constants
By declaring a constant, you can assign a meaningful name to a value. You use the Const statement to declare a constant […]
Early and Late Binding
What is binding? Binding is a process of matching function calls written by the programmer to the actual code (internal or external) […]
Excel VBA Code Names
Workbook and sheet modules have a property called CodeName, which is how the object is know internally to VBA. learn more about CodeName.
Executing code when setting properties
You can create Property Let, Property Set, and Property Get procedures that share the same name. By doing this, you can create […]