Where did you place it? It belongs in the Sheet module for the specific sheet. Not a "standard" module, or the This workbook module.
> >From: Ramkesh Maurya <sunscel...@gmail.com> >To: excel-macros@googlegroups.com >Sent: Thu, September 30, 2010 10:51:38 AM >Subject: Re: $$Excel-Macros$$ > > >Hi Dave, > >I copied the code but unable to execute it, Can u please tell me where I am >wrong? > >Regards >Ramkesh > > >On Thu, Sep 30, 2010 at 5:58 PM, Paul Schreiner <schreiner_p...@att.net> wrote: > >I would use a sheet change event: >>'---------------------------------------------------------------------------------------- >> >>Private Sub Worksheet_Change(ByVal Target As Range) >> Dim Targ As Range >> For Each Targ In Target >> If Targ.Column = 1 Then >> Application.EnableEvents = False >> If (Targ.Value & "X" = "X") Then >> Cells(Targ.Row, "B").ClearContents >> Else >> If (Cells(Targ.Row, "B") & "X" = "X") Then Cells(Targ.Row, >>"B") >>= Now >> End If >> Application.EnableEvents = True >> End If >> Next Targ >>End Sub >> >>'---------------------------------------------------------------------------------------- >> >> >>Paul >> >> >> >>> >>>From: Ramkesh Maurya <sunscel...@gmail.com> >>> >>>To: excel-macros@googlegroups.com >>>Sent: Wed, September 29, 2010 2:36:06 PM >>>Subject: Re: $$Excel-Macros$$ >>> >>> >>> >>>Dear Dave, >>> >>>Thanks for paying attention, >>> >>>Yes I am allowed to use Macro & I want the date in Col B only when the >>>adjecent >>>cell Col A received some text for the first time >>> >>>Regards >>>Ramkesh >>> >>> >>>On Wed, Sep 29, 2010 at 7:50 AM, Dave Bonallack <davebonall...@hotmail.com> >>>wrote: >>> >>>A further question: Do you want the date in Col B to enter only when the >>>adjacent cell in Col A receives text for the first time, or any time the >>>adjacent Col A cell is changed? >>> >>>> >>>>Regards - Dave. >>>> >>>>________________________________ Date: Tue, 28 Sep 2010 23:40:09 +0530 >>>>Subject: $$Excel-Macros$$ >>>>From: sunscel...@gmail.com >>>>To: excel-macros@googlegroups.com >>>> >>>> >>>>Dear All, Xl Mania(s) >>>> >>>>I really appreciate this group for learning >>>>I have lrarnet a lot of tricks from this group which enabled me to come of >>>>with >>>>flying colours.Today i am posting my first query briefing in below >>>>lines----------- >>>> >>>> 1- I fill some text in column A (say) >>>> 2- I want that the date of filling data should appear in column B (beside >>>>the >>>>column A) >>>> >>>>Now condition is ----- >>>> >>>> 3 -Date in column B should not be updated by re-calculation nature of >>>>Excel or >>>>user >>>> >>>> >>>>I know that anybody will help me so thanks in advance ! >>>> >>>>-- >>>> >>>> >>>>Ramkesh >>>> >>>> >>>>-- >>>>---------------------------------------------------------------------------------- >>>> >>>>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 >>>> >>>><><><><><><><><><><><><><><><><><><><><><><> >>>>Like our page on facebook , Just follow below link >>>>http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&ref=ts >>>> >>>>-- >>>>---------------------------------------------------------------------------------- >>>> >>>>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 >>>> >>>><><><><><><><><><><><><><><><><><><><><><><> >>>>Like our page on facebook , Just follow below link >>>>http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&ref=ts >>>> >>> >>> >>>-- >>> >>> >>>Ramkesh >>>9990260398 >>>-- >>>---------------------------------------------------------------------------------- >>> >>>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 >>> >>><><><><><><><><><><><><><><><><><><><><><><> >>>Like our page on facebook , Just follow below link >>>http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&ref=ts >>> >>-- >>---------------------------------------------------------------------------------- >> >>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 >> >><><><><><><><><><><><><><><><><><><><><><><> >>Like our page on facebook , Just follow below link >>http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&ref=ts >> > > >-- > > >Ramkesh >9990260398 >-- >---------------------------------------------------------------------------------- > >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 > ><><><><><><><><><><><><><><><><><><><><><><> >Like our page on facebook , Just follow below link >http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&ref=ts > -- ---------------------------------------------------------------------------------- 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 <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&ref=ts