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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SIMPLE QUESTION: How to declare a variable and assign a value

Status
Not open for further replies.

mike777

Programmer
Jun 3, 2000
387
US
Is it possible in VB to say (the equivalent of):
Code:
Dim x as Integer=5
,
so that x will simultaneously be declared as an integer and be assigned an initial value of 5?
I need to do this at the module level.
Many thanks.
-Mike
 
Mike: I tried and it would even compile LOL (but then we all know the kind of day I'VE had)
 
You can try Set variableX = 5, but that will make an assumption about the data type, if that's OK.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top