Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Declarations 2

Status
Not open for further replies.

pdldavis

Technical User
Oct 29, 2001
522
US
Hi I have a question about declarations.

I understood this:

Dim eAR, eCI, eCN, eEL, eME, eST As Long

to mean all these items are delcared long.

I was told that actually eST is the only one declared as long and the preceeding four are variants written out this way.

The correct way to do this would be:

Dim eAR As Long, eCI As Long, eCN As Long, eEL As Long, eME As Long, eST As Long

Is this correct?

Thanks, Dan

 
Yes - directly from the help file included with Access:
' Multiple declarations on a single line. AnotherVar is of type Variant
' because its type is omitted.
Dim AnotherVar, Choice As Boolean, BirthDate As Date
A simple test on your part would confirm that - try setting eAR to "A string" - that would definitely show it is not a long.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top