Enter your email address:

Delivered by FeedBurner



Use your pdf converter to make your pdf files easy! You can now buy software that makes converting pdf to doc possible! Did you know you can even convert pdf to word?
Home Page

Bloglines

1906
CelebrateStadium
2006


OfficeZealot

Scobleizer

TechRepublic

AskWoody

SpyJournal












Subscribe here
Add to 

My Yahoo!
This page is powered by Blogger. Isn't yours?

Host your Web site with PureHost!


eXTReMe Tracker
  Web http://www.klippert.com



  Saturday, May 28, 2016 – 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:

Dim strFName, strLName, strMI As String

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:

Dim strFName As String, strLName As String, strMI As String


See all Topics

Labels: , , , ,


<Doug Klippert@ 3:52 AM

Comments: Post a Comment