Let Statement

Assigns a value to a variable.


Let Statement diagram

[Let] variable = expression


variable: Variable that you want to assign a value to. Value and variable type must be compatible.

Note Icon

As in most BASIC dialects, the key word Let is optional.


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

Please support us!