Private Sub Command1_Click()
Dim x as '定义 x 为整型
x = Val(Text1.Text)
Then '条件语句
Text2.Text=
Else
Text2.Text = Str(0.2 + 0.1 * (x - 3))
End If
End Sub
Dim a As String, b As String, c As String
a = "印象西湖"
b = "中国"
c = b + Mid(a, 1, 2)
Lab.Caption = c
Dim a As Single, b As Single, c As Single, w As Single
w = 6: a = 60: b = 50: c = 30
If w <= 10 And a + b + c <= 115 Then
Label1.Caption = "携带"
Label1.Caption = "托运"
Dim d(1 To 8) As Integer
Dim i As Integer
For i = 1 To 8
d(i) = 2 * i
List1.AddItem Str(d(i))
Next i