Dim Clicks As IntegerPrivate Sub Command1_Click()Clicks = Clicks + 1If Clicks = 10 Then Command1.Enabled = FalseEnd Sub