I am trying to disable a button placed on my sheet1 once the user click on it. I went through few old Stackoverflow answers but dosent work as my expectation.
The code:
Sub Button2_Click()
Call FindADate
Dim myshape As Shape: Set myshape = ThisWorkbook.Worksheets("Sheet1").Shapes("Button 2")
With myshape
.ControlFormat.Enabled = False '---> Disable the button
.TextFrame.Characters.Font.ColorIndex = 15 '---> Grey out button label
End With
End Sub
It actually grayed out the button which give a feel that the button is disabled but User can click again and again and it run my code.
Kindly let me know a solution to get the button disabled after 1 click, the button will be active again only once I close and re open the excel. (I am using MS Office professional Plus 2013)
Thanks in advance.