ListEvents方法示例
2015-12-15 22:24:31 来源: 评论:0 点击:
下列示例获得
对象Oval1的数目和相应的事件列表。Private Sub Oval1_Click()Dim strMsg As StringDim pvEvents As VariantDim iNumEvents As IntegerstrMsg = "This object has the following
下列示例获得 对象Oval1的数目和相应的事件列表。
Private Sub Oval1_Click()
Dim strMsg As String
Dim pvEvents As Variant
Dim iNumEvents As Integer
strMsg = "This object has the following events: "
Oval1.ListEvents pvEvents, iNumEvents
For Each i In pvEvents
strMsg = strMsg + i + ","
Next
MsgBox strMsg, vbOKOnly, "Message"
End Sub