I have a command button that I inserted into a worksheet, and I wanted to know which function I have to assign in the vba code, to know when a user clicks it!
I have a command button that I inserted into a worksheet, and I wanted to know which function I have to assign in the vba code, to know when a user clicks it!
If it is an Active-x Active-X Controls button double-click the button and it will open a Sub to create your code in VBA.
If it is a common Form Controls button, you can create your macro and then right click on the button, select the Assign macro ... , select your macro and have your button perform the function you want.
I hope I have helped!
On the click counter, you can make it disappear in any cell when the user clicks the button. For example:
Sub Button1_Click()
Sheet1.Cells(1, 1).Value = Sheet1.Cells(1, 1).Value + 1
End Sub
Surely you will find more effective ways to do this, but this is the simplest as far as I know!
Good morning,
I was able to resolve using the ActiveX button, when someone clicks on it, it assigns a variable that enables a specific worksheet.
Thanks to everyone for the collaboration.