PDA

View Full Version : Solved: What does this Dim mean?



rickalty
12-12-2006, 01:26 PM
Hi, I've always used the DIM statement as in :

DIM myvar AS Double

or similar. However, I have to work on a project abandoned by an ex-employee, and I see numerous uses of :

Dim myvar#

throughout the code. He's also used undeclared variables in subs such as :

Function Table5Back#(API60#, temp#, Table$)

I'm 'guessing' that the # indicates that the variable is numerical and the $ that it's a string, but I've not seen this usage before.

Richard

CodeMakr
12-12-2006, 01:37 PM
I believe these are type-declaration characters. # is double, $ is string, @ is currency, & is long, etc.

Andy Pope
12-12-2006, 01:41 PM
From the help file.

Integer is the percent sign (%)
Double is the number sign (#)
Long is the ampersand (&)
Single is the exclamation point (!)
String is the dollar sign ($)

rickalty
12-12-2006, 02:46 PM
Thanks, everyone.

I couldn't find that list in the help file.

Richard

mdmackillop
12-12-2006, 02:58 PM
Hi Richard
Welcome to VBAX.
If your question is Solved, please mark it so using Thread Tools
Regards
MD

rickalty
12-12-2006, 03:01 PM
Done, thanks again.

Richard