It's an ancient way of declaring variables, so ancient that it doesn't
include all data types.
There are 5 type-declaration symbols that I'm aware of:
! - Single
# - Double
$ - String
% - Integer
& - Long
(no Date, Boolean, Currency or Double.)
Dim strMyString$, intMyInteger%
is identical to
Dim strMyString As String, intMyInteger As Integer
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"mcescher" <(E-Mail Removed)> wrote in message
news:94788162-001b-48ae-be0e-(E-Mail Removed)...
> Hi All,
>
> I was looking at some code on Dev Ashish's site, and one function was
> declared differently than I had seen before.
>
> Function Lpad(MyValue$, MyPadCharacter$, MyPaddedLength%)
> <<some vba code here>>
> End Function
>
> I understand the code, but I'm wondering about the declaration.
>
> Is "MyValue$" the same as "MyValue AS String"?
>
> Does the % then specify an integer?
>
> Is there a list of other character declarations?
>
> Does that work with a regular dim statement?
> i.e. DIM strMyString$, intMyInteger%
>
> Thanks so much,
> Chris M.