Let Statement

為變數指定一個值。

語法

Let Statement diagram


[Let] variable = expression

參數:

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

評註圖示

像大多數 BASIC 語言一樣,關鍵字 Let 是可選擇的。


示例:


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

Please support us!