895006375 发表于 2016-10-14 14:39:32

求大神看看我的编码哪里错了,电灯不能显黄色

Dim s As Integer

Private Sub Command1_Click()
If s >= 5 Then
Shape1.FillColor = vbYellow
Command1.Caption = "电灯已经炸了"


End If

If Shape1.FillColor = vbBlack Then
Shape1.FillColor = vbWhite
s = s + 1
Command1.Caption = "电灯已经开了"
Else
Shape1.FillColor = vbBlack
Command1.Caption = "电灯已经关闭"
s = s + 1

End If



End Sub

Private Sub Form_Load()
s = 0
End Sub
页: [1]
查看完整版本: 求大神看看我的编码哪里错了,电灯不能显黄色