Host your Web site with PureHost!
Saturday, September 12, 2009 – Permalink –
Declaring Multiple Variables
Declare each one
When setting up a macro in VBA, if you want to declare multiple variables in one line of code, be sure to specify the type for each variable, even if the variables are the same type. Avoid code like the following:
In such a case, only the last variable, strMI, is actually declared as a String type. The first two variables are designated by default as Variant data types.
To correctly declare the three variables, you would use the statement:
See all Topics
<Doug Klippert@ 6:47 AM
Comments: Post a Comment