Thanks Mangesh, Please follow this excel macro group on regular basis and Start recording macros, and perform actions in the excel spreadsheet.The macro recorder will record macro. A lot of the lines may be superfluous, but you'll get a general perspective of how macro works. Slowly, you'll learn to read and differentiate between lines that actually do the task, and the superfluous ones.
As an example, I recorded my action. I typed in a few lines is what I did. Code: Sub Macro1() Range("B3").Select ActiveCell.FormulaR1C1 = _ "I am recording a macro to understand what the macro recorder records." Range("B4").Select ActiveCell.FormulaR1C1 = _ "OK, I'll now write another text. I wonder what the macro recorder would have recorded now." Range("B5").Select ActiveCell.FormulaR1C1 = "Oh well, been years since I did something like this." Range("D3").Select ActiveCell.FormulaR1C1 = _ "Ok, just for the sake of it, I've scrolled to the right a bit and moved up to cell D3, to type this text." Range("D4").Select End Sub Now, a lot of those lines are superfluous. I could rewrite it like so. Code: Sub Macro2() Range("B3").Resize(3, 1).Value = _ Array("I am recording a macro to understand what the macro recorder records.", _ "OK, I'll now write another text. I wonder what the macro recorder would have recorded now.", _ "Oh well, been years since I did something like this.") Range("D3").Value = "Ok, just for the sake of it, I've scrolled to the right a bit and moved up to cell D3, to type this text." End Sub So you see, just record macro, and eventually, the macro will teach you a lot of the syntax. Based on your understanding of how things work, you can then reduce the lines of code as I have did above. Note: Since Excel 2007 Chart actions are not recorded, and I can assure you a lot of others aren't (for reasons I do not want to pretend I know), if you want to go the learning path by recording, I recommend Excel 97-2003, or Excel 2010. http://www.excelfox.com/forum/f2/self-learn-excel-vba-193/ Thanks & regards, Noorain Ansari *http://noorainansari.com/* *http://excelmacroworld.blogspot.com/*<http://excelmacroworld.blogspot.com/> On Wed, Mar 21, 2012 at 10:25 PM, Mangesh Dayne <mangesh.da...@gmail.com>wrote: > Hi Noorain, > > You are simply awesome man !!! > How many days you take to learn macros. Please tell me so that I could > start to achieve something like you. > Also provide me some tips for same. > > Kindly help. > > Mangesh > > > On Wed, Mar 21, 2012 at 10:00 PM, NOORAIN ANSARI <noorain.ans...@gmail.com > > wrote: > >> See attached sheet, >> >> >> -- >> >> On Wed, Mar 21, 2012 at 9:48 PM, NOORAIN ANSARI <noorain.ans...@gmail.com >> > wrote: >> >>> Dear Naresh, >>> >>> pls try it.. >>> >>> Sub copyPastedata_in_Notepad() >>> With Application >>> Selection.Copy >>> Shell "notepad.exe", 3 >>> SendKeys "^v" >>> VBA.AppActivate .Caption >>> .CutCopyMode = False >>> End With >>> End Sub >>> >>> >>> >>> On Wed, Mar 21, 2012 at 8:16 PM, Naresh V >>> <naresh.veerabo...@gmail.com>wrote: >>> >>>> Team, >>>> >>>> I have data in excel sheet column E, this data should paste in >>>> new notepad after that column E copymode must be normal. >>>> (Cutcopymode=false) >>>> >>>> can you please provide code for this >>>> >>>> Thanks in advance... >>>> >>>> Regards, >>>> Naresh V >>>> >>>> -- >>>> FORUM RULES (986+ members already BANNED for violation) >>>> >>>> 1) Use concise, accurate thread titles. Poor thread titles, like Please >>>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice >>>> will not get quick attention or may not be answered. >>>> >>>> 2) Don't post a question in the thread of another member. >>>> >>>> 3) Don't post questions regarding breaking or bypassing any security >>>> measure. >>>> >>>> 4) Acknowledge the responses you receive, good or bad. >>>> >>>> 5) Cross-promotion of, or links to, forums competitive to this forum in >>>> signatures are prohibited. >>>> >>>> NOTE : Don't ever post personal or confidential data in a workbook. >>>> Forum owners and members are not responsible for any loss. >>>> >>>> >>>> ------------------------------------------------------------------------------------------------------ >>>> To post to this group, send email to excel-macros@googlegroups.com >>>> >>> >>> >>> >>> -- >>> Thanks & regards, >>> Noorain Ansari >>> ** <http://excelmacroworld.blogspot.com/>*http://noorainansari.com/* >>> *http://excelmacroworld.blogspot.com/*<http://excelmacroworld.blogspot.com/> >>> >>> >>> >> >> >> >> -- >> FORUM RULES (986+ members already BANNED for violation) >> >> 1) Use concise, accurate thread titles. Poor thread titles, like Please >> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice >> will not get quick attention or may not be answered. >> >> 2) Don't post a question in the thread of another member. >> >> 3) Don't post questions regarding breaking or bypassing any security >> measure. >> >> 4) Acknowledge the responses you receive, good or bad. >> >> 5) Cross-promotion of, or links to, forums competitive to this forum in >> signatures are prohibited. >> >> NOTE : Don't ever post personal or confidential data in a workbook. Forum >> owners and members are not responsible for any loss. >> >> >> ------------------------------------------------------------------------------------------------------ >> To post to this group, send email to excel-macros@googlegroups.com >> > > -- Thanks & regards, Noorain Ansari ** <http://excelmacroworld.blogspot.com/>*http://noorainansari.com/* *http://excelmacroworld.blogspot.com/*<http://excelmacroworld.blogspot.com/> -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com