Create a Macro in MS Excel Using MS Visual Basic
Create a Macro in MS Excel Using MS Visual Basic
Submitted by Dennis Faas on Tue, 08/26/2008 - 08:00
This is a different method for creating a macro in MS Excel 2007. You can use this method if you want to write your own script or if you want to copy and paste a part of another macro into an existing macro. You can also use this method to copy and paste a new macro.
Follow the steps below:If the Developer tab is not available, do one of the following to display it:
- Click the Microsoft Office Button, and then click Excel Options.
- In the Popular category, under Top Options for working with Excel, select the Show Developer tab in the Ribbon check box.
- Click OK.
To set the security level temporarily to enable all macros, do the following:
- On the Developer tab, in the Code group, click Macro Security.
- Under Macro Settings, click Enable all macros. Ordinarily, you should not do this as you could allow potentially dangerous code to run.
- Click OK.
- On the Developer tab, in the Code group, click Visual Basic.
- If needed, on the Insert menu, click Module.
- In the code window of the module, type or copy the macro code that you want to use.
- To run the macro from the module window, press F5.
- On the File menu, click Close and Return to Microsoft Excel when you are finished writing your macro.
Feel just like a software developer now don't you?
When you become a member at CarolsCornerOffice.com, you have access to this and many, many more articles that include screenshots. Don't delay: visit us today!
Rate this article:
Category:
Tags:
Need Help? Ask!

My name is Dennis Faas and I am a senior systems administrator and IT technical analyst specializing in cyber crimes (sextortion / blackmail / tech support scams) with over 30 years experience; I also run this website! If you need technical assistance , I can help. Click here to email me now; optionally, you can review my resume here. You can also read how I can fix your computer over the Internet (also includes user reviews).

My name is Dennis Faas and I am a senior systems administrator and IT technical analyst specializing in cyber crimes (sextortion / blackmail / tech support scams) with over 30 years experience; I also run this website! If you need technical assistance , I can help. Click here to email me now; optionally, you can review my resume here. You can also read how I can fix your computer over the Internet (also includes user reviews).
We are BBB Accredited
We are BBB accredited (A+ rating), celebrating 21 years of excellence! Click to view our rating on the BBB.