Private Sub CommandButton1_Click()
CommandButton1.Enabled = False
Range("N3") = Date
End Sub
Private Sub CommandButton2_Click()
CommandButton2.Enabled = False
Range("N4") = Date
End Sub
一直到
Private Sub CommandButton98_Click()
CommandButton98.Enabled = False
Range("N100") = Date
End Sub
請問有辦法簡化嗎?謝謝大大們作者: owen06 時間: 2015-2-6 13:12
Private Sub CommandButton_Click()
On Error Resume Next
Dim i As Integer
For i = 3 To 100
If CommandButton & i = False Then
Cells(i, 10) = Date
End If
Next
End Sub
自己亂寫的,想讓大家了解,大概就是這樣的模式,謝謝作者: linyancheng 時間: 2015-2-18 00:27