===============================
Private Sub cmdQue1_Click()
a = Val(txtQue1Input1.Text)
b = Val(txtQue1Output.Text)
txtQue1Output = (a * a * a) + 8
End Sub
Private Sub cmdQue2_Click()
If Val(txtQue2Input2) > (txtQue2Input1) Then
MsgBox " 參考值大於比較值。"
End If
If Val(txtQue2Input1) > (txtQue2Input2) Then
MsgBox "比較值大於參考值"
End If
If Val(txtQue2Input1) = (txtQue2Input2) Then
MsgBox "比較值等於參考值"
End If
If Val(txtQue2Input1) < (txtQue2Input2) Then
MsgBox "比較值小於參考值"
End If
If Val(txtQue2Input2) < (txtQue2Input1) Then
MsgBox "參考值小於比較值"
End If
End Sub
Private Sub cmdQue3_Click()
m = Val(txtQue3Input1.Text)
n = Val(txtQue3Input2)
For i = m To n
ans = ans + 2 * i + 1
Next i
MsgBox ans
End Sub
Private Sub cmdQue4_Click()
w = txtQue4Input.Text
Select Case w
Case "1"
MsgBox " 星期一"
Case Is = "2"
MsgBox "星期二"
End Select
If w = "3" Then
MsgBox "星期三"
End If
If w = "4" Then
MsgBox "星期四"
End If
If w = "5" Then
MsgBox "星期五"
End If
If w = "6" Then
MsgBox "星期六"
End If
If w = "7" Then
MsgBox "星期日"
End If
End Sub
Private Sub cmdQue5_Click()
a = Val(txtQue5Input)
b = a / 2
End Sub
Private Sub cmdQue6_Click()
x = Val(txtQue6Input.Text)
For i = 1 To x
ans = i & ans
Next i