Private Sub Command1_Click(Index As Integer)
if Index=0 Then
msgbox "你单击的是0号按钮"
else
msgbox "你单击的是1号按钮"
end if
End Sub
或者:
Private Sub Command1_Click(Index As Integer)
msgbox "你单击的是" & Index & "号按钮"
End Sub
Private Sub Command1_Click(Index As Integer)
Select Case Index
Case 0
Msgbox "你单击的是0号按钮"
Case Else
Msgbox "你单击的是1号按钮"
End Select
End Sub
其实你没有说明白你要实现的目的,不知道怎么说,……