Let Statement Example

This example assigns the values of expressions to variables using the explicit Let statement.

Dim MyStr, MyInt
' The following variable assignments use the Let statement.
Let MyStr = "Hello World"
Let MyInt = 5

The following are the same assignments without the Let statement.

Dim MyStr, MyInt
MyStr = "Hello World"
MyInt = 5