vb编程不知道哪里不对

来源:百度知道 编辑:UC知道 时间:2024/05/24 07:42:59
Private Sub Form_Load()
Dim h As Integer
Show h = Hour(Time)
'FontSize = 30
If h <= 12 Then
Print "上午好"
Else If h <= 18then
Print "下午好"
Else
Print "晚上好"
End If
End Sub
高手帮忙看看

提示什么???

HBpcbar答案正确,LZ的会直接提示编译错误/语法错误

只能用Elseif 或者Else ,如果用Else后在IF就必须给该IF对应END IF

Else If h <= 18then 中“18then”应分开写

Else If h <= 18then 中“18then”应写成
ElseIf h <= 18 then