what is excel code? is it visual basic code? how to use in excel? is it related to macro?

learning_grexcel

Active Member
Joined
Jan 29, 2011
Messages
319
Hi,
I always see excel codes in this forum but I don't know what it is. Is it visual basic code? or anything else? is it a macro? Even if it is macro, how do I use that in excel? Where to copy and paste these codes?

Please help with this.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Hello,

The codes are macros. You are correct about being Visual Basic.

To use or write code:
Alt+F11... Open VBEditor
keystrokes Alt - I - M to insert a module.

Here is where standard code goes (pasted into or written).

There are other modules, for individual sheets, workbooks and more.

Close the VBEditor.
Alt+F8 will open the macro dialog, select your macro and click run to run.

Note: Not all Apple supports macros.

-Jeff
 
Upvote 0
Just adding to Jeffs comments
A macro, or VBA code, is used to eliminate
1. tasks that would normally take a long and tedious exercise down to a few seconds
2. anything that you do on a regular and repetitive basis.

So, for instance, if you had to create a report every month / week from thousands of lines of data would take all day...whereas a macro would do it a matter of seconds.
In VBA you can also create Specifically designed forms and menus for any number of various tasks. That's why you will see a number of questions here about userforms.If you want to learn more about VBA have a look here. Some sites provided previously by Hiker95
Code:
Training / Books / Sites:

How to Learn to Write Macros 
http://articles.excelyogi.com/playin...ba/2008/10/27/

How to use the macro recorder 
http://articles.excelyogi.com/

Click here and scroll down to Getting Started with VBA. 
http://www.datapigtechnologies.com/ExcelMain.htm

If you are serious about learning VBA try 
http://www.add-ins.com/vbhelp.htm

Excel Tutorials and Tips - VBA - macros - training 
http://www.mrexcel.com/articles.shtml

See David McRitchie's site if you just started with VBA
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Debra Dalgleish has some notes how to implement macros here:
http://www.contextures.com/xlvba01.html


David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

Creating custom functions
http://office.microsoft.com/en-us/ex...117011033.aspx

Writing Your First VBA Function in Excel
http://www.exceltip.com/st/Writing_Y...Excel/631.html

http://www.excel-vba.com/
http://www.mvps.org/dmcritchie/excel/getstarted.htm
http://www.exceltip.com/excel_links.html


HTH
 
Upvote 0

Forum statistics

Threads
1,224,568
Messages
6,179,572
Members
452,927
Latest member
whitfieldcraig

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top