hi Ashish First of all thaks.I tried your code but the color code index is not working well,after the macro2() running it fails to set color code index property, how can i solve it. Regards Rajesh kainikkara
On 11/17/10, OpenExcel.com <ashishj...@openexcel.com> wrote: > Hi Rajesh, > > I modified your code. You may try these codes: > For Sheet1: Event Macro > Private Sub Worksheet_SelectionChange(ByVal Target As Range) > Application.EnableEvents = False > Columns(3).Interior.ColorIndex = xlNone > Cells(ActiveCell.Row, 3).Interior.Color = vbYellow > Application.EnableEvents = True > End Sub > > For Module1: > Sub Macro1() > ActiveSheet.Unprotect > Application.EnableEvents = False > Application.ScreenUpdating = False > Range("D2").Copy > Range("B4").PasteSpecial Paste:=xlPasteValues > Range("B4:G22").Copy > Sheets("STOCK").Range("A3").Insert SHIFT:=xlDown > Range("F4:F22").Copy > Range("F4").PasteSpecial Paste:=xlPasteValues > Sheets("ENTRY").Range("g4:g22").Copy > Range("d4").PasteSpecial Paste:=xlPasteValues > Range("e4:f22").ClearContents > Range("D2").Copy > Range("Z2").PasteSpecial Paste:=xlPasteValues > Range("D2").Select > Range("D2").Value = Range("Z2") + 1 > Range("D4").Select > Application.CutCopyMode = False > Application.EnableEvents = True > Application.ScreenUpdating = True > ActiveSheet.Protect > End Sub > > Sub Macro2() > Application.EnableEvents = False > Application.ScreenUpdating = False > If Range("I1") >= 0 Then > If Range("H23") = 0 Then > If MsgBox("NO VALUES ENTERED?", vbOKCancel, "Warning") > = vbOK Then > Call Macro1 > End If > ElseIf Range("H23") > 0 Then > If MsgBox("DO YOU WANT TO CHANGE DATE?", vbOKCancel, > "Warning") = vbOK Then > Call Macro1 > End If > End If > End If > Application.EnableEvents = True > Application.ScreenUpdating = True > End Sub > > > PS: In future please do not send attachments, rather try to elaborate > your problem efficiently. The group is to help and solve your issues > not your projects. > ________________________________________ > Thanks & Regards > Ashish Jain > McKinsey India Knowledge Center > (Microsoft Certified Application Specialist) > (Microsoft Certified Professional) > http://www.excelitems.com > http://www.openexcel.com > ________________________________________ > > > On Nov 12, 7:24 pm, Rajesh K R <rajeshkainikk...@gmail.com> wrote: >> HI EXPERTS >> >> PLS FIND THE ATTATCHMENT, >> IN THIS FILE IF THE COLOUR CHANGING CODE IS NOT USED THE CODE IS >> WORKING WELL , WHAT IS THE SOLUTION >> HELP ME PLEASE >> >> REGARDS >> >> RAJESH KAINIKKRA >> >> REST STOCK NEW.XLS >> 93KViewDownload > > -- > ---------------------------------------------------------------------------------- > 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