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 keyword Let is optional.


āļ‹āļ¯āˇāˇ„āļģāļĢāļē:


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

Please support us!