返回列表 上一主題 發帖

如何控制指令按鈕次數??

工作表模組
Private Sub CommandButton1_Click()
Static x
x = x + 1
'你要做的工作
If x = 3 Then CommandButton1.Enabled = 0
End Sub
---------------------------------------
This WorkBook模組
Private Sub Workbook_Open()
Sheet1.CommandButton1.Enabled = 1
End Sub

TOP

        靜思自在 : 盡多少本份,就得多少本事。
返回列表 上一主題