Each time you see $ after a function in VB 6, this means that the function is a String version , i.e. it returns a value of type String . The unsigned version is a Variant function, which of course means that it returns a value of type Variant .
In general, you should always use String versions in Variant versions.
The dollar sign also means the same thing if it appears after the variable name instead of the specified type. Here it is part of a larger family of abbreviated "type declaration characters" that were needed in earlier versions of BASIC, but by the time even VB 6 arrived on the scene, it was obsolete. For example:
Dim name$
indicates a variable named name that is of type String . Alternative (and preferred!) Notation:
Dim name As String
If you are dealing with legacy code where they appear, here is the entire list for completeness:
& Long % Integer
Cody gray
source share