Hi Techy,
I've added a Command Button (Form Control) in an Excel Sheet. Since then I tried to write code under the Click method of this command button.
I don't know whether it's possible to add code under click method of Command Button (Form Control).
Any help will be highly appreciated.
Thanks
Jessica
Stuck in Excel 2007 Form Control Coding ( Command Button )
Hello Jessicafstout,
If you want to add the code over the button then you need to follow some of the steps.
But if you are using any of the programming language then the code may vary from one language to the other.
You need to right click on the button after that you need to write the operation to be performed there in order to make it easy to use for the user.
But if you want to get more guide and also you want to assign a macro to your button then you can get it from the link all you need is to follow some of the steps mentioned in the website.
Stuck in Excel 2007 Form Control Coding ( Command Button )
Hi Jessica,
Since you are working with excel so I assume that you are pertaining to adding macros to your Sheet.
I am a bit confused when you said “Since then I tried to write code under the Click method of this command button" versus “I don't know whether it's possible to add code under click method of Command Button (Form Control)”.
So I am guessing that the code you tried does not work?
You actually answered your question. Yes, you can write codes and to be specific these are VB codes.
Please check my attachment for a sample code.