Hi, Try this.
Open a new workbook. If it's 2003 or earlier: >From the Tools menu, select: Macro, Record Macro Click OK in the window that appears. Then selcet Cell A1 and type 123ABC Hit enter. With Cell A2 selected, colour the background Green. >From the Tools menu, select: Macro, Stop recording. Now press Alt+F11 DoubleClick on Modules DoubleClick on Module1 You should see a macro, which is code for how to do what you just did. The business part of the macro is: Range("A1").Select ActiveCell.FormulaR1C1 = "123ABC" Range("A2").Select With Selection.Interior .ColorIndex = 4 .Pattern = xlSolid End With Each line tells a story, most of which you can figure out. You selected Cell A1 (VBA calls this a Range) You entered 123ABC (into the selected cell) You selected Cell A2 (by hitting Enter) The next 4 lines are a group They talk about the interior of the selected cell Colour = 4 (Green) Pattern = Solid (not speckled) The macro recorder is very useful, but later, as you learn the syntax, you write the code yourself. Macros can perform very complicated routines, and are useful when you need to do the same thing hundreds, or hundreds of thousands, of times. Hope this helps. Regards - Dave. Date: Wed, 1 Sep 2010 09:12:56 +0530 Subject: $$Excel-Macros$$ Excel Macros ? From: harilal....@gmail.com To: excel-macros@googlegroups.com HLC Dear Excel Friends, I am a beginner in Excel. I would like to know what is Excel Macro !!!!! Can we develop a programme in Excel Macro ? How to develop a small programme in Excel Macro? What are the advantages ? Is there any body in our community to help me with a simple example on Excel Macro !!!! Please help me!!!!!!!!!!!!!!!! Hari Lal -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 7000 subscribers worldwide and receive many nice notes about the learning and support from the group.Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 7000 subscribers worldwide and receive many nice notes about the learning and support from the group.Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe