CutterSoilMixing
New Member
- Joined
- Jun 8, 2019
- Messages
- 17
- Office Version
- 365
- Platform
- Windows
Hi everyone,
I created a command button from the ActiveX controls. I want it to add +1 to a certain cell, update the date in another cell, disable after clicking it once and re-enable after closing and opening the excel file. I got everything working but the re-enabling... please help, this is my first experience with VBA, macros etc.
Here's my code:
Private Sub CommandButton1_Click()
[BF5].Value = [BF5].Value + 1
[AZ6].Value = "=TODAY()"
CommandButton1.Enabled = False
End Sub
Sub Autpen()
CommandButton1.Enabled = True
End Sub
Thanks!
I created a command button from the ActiveX controls. I want it to add +1 to a certain cell, update the date in another cell, disable after clicking it once and re-enable after closing and opening the excel file. I got everything working but the re-enabling... please help, this is my first experience with VBA, macros etc.
Here's my code:
Private Sub CommandButton1_Click()
[BF5].Value = [BF5].Value + 1
[AZ6].Value = "=TODAY()"
CommandButton1.Enabled = False
End Sub
Sub Autpen()
CommandButton1.Enabled = True
End Sub
Thanks!