private sub cmd_Click()
static i as long
select case i
case 0
'事件1
case 1
'事件2
end select
i=i+1
if i=2 then i=0
end sub
static i as long
select case i
case 0
'事件1
case 1
'事件2
end select
i=i+1
if i=2 then i=0
end sub
Static i As Long
i = i + 1
MsgBox "第" & i & "次"
End Sub
把style改成图形的
然后在你按得时候根据 checkbox 的 value来判断
i = i + 1
Print "第" & i & "次"
End Sub
事件1
flag=false
End ifif flag=false then
事件2
End ifEnd sub
事件1
flag=false
End ifif flag=false then
事件2
flag=true
End ifEnd sub
i = i + 1
If i = 3 Then i = 1
Print "第" & i & "次"
End Sub
''''''''''''''''''''''''''''''''''
Dim i As BooleanPrivate Sub Command1_Click()
If i Then
Print "第 2 次"
i = False
Else
Print "第 1 次"
i = True
End If
End Sub
Private Sub Command1_Click()
select case i
case 0
'事件1
case 1
'事件2
end select
i = i + 1
End Sub
i = i + 1
Print "第" & i & "次"
End Sub
请教Static 有什么作用?