You can now click on the Developer tab which is now visible next to the View tab.
1. Click on Insert
2. Click on Command Button in the ActiveX Controls section
1. Click on Insert
2. Click on Command Button in the ActiveX Controls section
Create and assign the macro to our created button
We will write few lines of code and assign them to the command button.
1. Right click on the CommandButton1
2. Click on View Code
3. The Visual Basic Editor will be opened. Place you cursor between 'Private Sub CommandButton1_Click()' and 'End Sub'.
4. For example, add the following code line:
Range("A1").Value = "My First Code !"
4. For example, add the following code line:
Range("A1").Value = "My First Code !"
Great info! I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have.
ReplyDeleteexcel vba courses