What does the $ symbol do in VBA? What does the $ symbol do in VBA? vba vba

What does the $ symbol do in VBA?


Here is a Cheat Sheet for DataTypes

Variable End with:

$ : String% : Integer (Int16)& : Long (Int32)! : Single# : Double@ : Decimal

Start with:

&H : Hex&O : Octal

Comparison between VB and VB.Net (reference)

Visual Studio .Net added Literal Types (reference)

Value End with: (For more complete list, refer the the reference)

S : Short (Int16)I : Integer (Int32)L : Long (Int64)F : SingleR : DoubleD : Decimal


I think that the $ version returns a String, and the non $ version returns a variant.

Mid vs Mid$

http://forums.devarticles.com/microsoft-access-development-49/mid-function-vs-mid-26315.html


The dollar sign indicates a string will be returned instead of a variant.