[dba-VB] Which version of Visual Studio

Gustav Brock Gustav at cactus.dk
Tue Nov 15 10:34:38 CST 2011


Hi Stuart

You could but you didn't as that would have been sloppy code ...

In VB(A) it would have self corrected; in Access Basic your variable would have been renamed to strmonth; in Visual Studio intellisense would have warned you.

/gustav


>>> "Stuart McLachlan" <stuart at lexacorp.com.pg> 14-11-2011 23:50 >>>
Me too.   I wrote something like this just yesterday:

strMonth  = Left$(Date$,2)
lngMonth = Val(strMonth)
......
'lots of  addition code using one or other of the above variables depending on context.
....

It makes the code very easy to follow. 
And I could have written it as:
strMonth  = Left$(Date$,2)
lngMonth = Val(strmonth)

without any problem  :-)

-- 
Stuart





More information about the dba-VB mailing list