Create a Simple Program in MS Excel VBA
![Create a Simple Program in MS Excel VBA](https://mrcodings.com/wp-content/uploads/2020/06/First-VBA-Program.jpg)
Here we are going to create a simple program that will display a simple “Hello” message
Create Simple Program in MS Excel VBA Video in Hindi
Step:1: Go to Developer Tab and Turn On the Design Mode by clicking on it.
![Simple Program in MS Excel VBA](http://mrcodings.com/wp-content/uploads/2020/06/004-01-On-Design-Mode.jpg)
Step:2: Click on Insert Control Option and then click on the command button under the ActiveX Controls.
![](http://mrcodings.com/wp-content/uploads/2020/06/004-02-Select-Command-Button.jpg)
Step:3: Now draw the button on the sheet and then set its name and caption property by clicking on the Properties option.
![](http://mrcodings.com/wp-content/uploads/2020/06/004-03-Draw-Button-and-set-Property.jpg)
Step:4: Make it sure that Design mode is turn on then double click on the button to open coding window.
![Simple Program in MS Excel VBA](http://mrcodings.com/wp-content/uploads/2020/06/004-04-Double-click-on-button-and-write-code1.jpg)
Step:5: The coding window will open and write code to between click event of the command button.
![Simple Program in MS Excel VBA](http://mrcodings.com/wp-content/uploads/2020/06/004-05-write-code.jpg)
Step:6: Turn off the Design Mode and then click on the button to run the program
![Simple Program in MS Excel VBA](http://mrcodings.com/wp-content/uploads/2020/06/004-06-Turn-off-design-mode.jpg)
Output:
![Simple Program in MS Excel VBA](http://mrcodings.com/wp-content/uploads/2020/06/004-07-Output.jpg)
Leave a Reply