What s the difference between a VBA subroutine and a macro?
Nothing, really. The term macro is a carry-over from the old days of spreadsheets. These terms are now used interchangeably. What’s a procedure? A procedure can be either a subroutine or a function. What is a Variant data type? Variables that aren t specifically declared are assigned as a variant type, and VBA automatically converts the data to the proper type when it s used. This is particularly useful when getting values from a worksheet cell when you don t know in advance what the cell contains. Generally, it s a good idea to specifically declare your variables (using the Dim statement), because using variants is quite a bit slower. What’s the difference between a Variant array and an array of Variants? A Variant is a special data type that can contain any kind of data — a single value, or an array of values (that is, a Variant array). The code below creates a Variant that contains an array. Dim X as Variant X = Array(30, 40, 50) A normal array can contain items of a specified data