\<bookmark_value\>Let statement\</bookmark_value\>

Let Statement

Assigns a value to a variable.

Syntax:


[Let] VarName=Expression

Parameters:

\<emph\>VarName:\</emph\> Variable that you want to assign a value to. Value and variable type must be compatible.

Note Icon

As in most BASIC dialects, the keyword \<emph\>Let\</emph\> is optional.


Example:


Sub ExampleLet
Dim sText As String
    Let sText = "Las Vegas"
    MsgBox Len(sText) REM Returns 9
End Sub

Please support us!