WAY too much missing information to be able to give you a thorough macro...
Here's what I can summarize from your first post: You enter a value in sheet2.range(B9) sheet2 gathers info from sheet1 based on sheet1.column(a) matching sheet2.range(B9) so, you could try: Private Sub Workbook_BeforePrint(Cancel As Boolean) Dim rCnt, RecRow, I Dim inx inx = UCase(Sheet2.Range("B9").Value) rCnt = Application.WorksheetFunction.CountA(Sheet1.Range("a1:A65000")) RecRow = 0 For I = 1 To rCnt If UCase(Sheet1.Cells(I, "A").Value) = inx Then RecRow = I Exit For End If Next I If (RecRow > 0) Then Sheet1.Cells(RecRow, "F") = "P" Else MsgBox "data not found in Sheet1" Cancel = True End If End Sub Paul ________________________________ From: OSA <osav...@gmail.com> To: excel-macros@googlegroups.com Sent: Wed, April 14, 2010 8:16:34 PM Subject: Re: $$Excel-Macros$$ VBA PRINTING AND RECORD UPDATING Hi Paul, Thank you always for your response. I guess worksheet before print is Ok. Please suggest a short code. thanks. On Wed, Apr 14, 2010 at 7:28 PM, Paul Schreiner <schreiner_p...@att.net> wrote: There are several "event" macros in excel. >One is called Worksheet_beforePrint > >there isn't a Worksheet_afterPrint macro (sorry) > >but in this case, you can cause the "P" to be placed before printing. >Also, you'd want to use a sheetchange event to clear the "P" when anything is >changed. > >let me know if you need additional help with this. > >Paul > > > > ________________________________ From: OSA <osav...@gmail.com> >To: excel-macros@googlegroups.com >Sent: Wed, April 14, 2010 2:08:49 AM >Subject: $$Excel-Macros$$ VBA PRINTING AND RECORD UPDATING > > >Dear Group, > >I have a worksheet (sheet2) that I always print. Many of the information from >this printed worksheet is coming from record located at sheet1. Column A in >sheet1 contains the codes which I input in sheet2.range(b9) as a criteria to >extract data from sheet 1. > >I would like that after printing my sheet2, the column F in sheet1 is update >with value "P" meaning that line record has been printed. >Is this possible in VBA? > >thanks for help. > >Grace > > >-- >---------------------------------------------------------------------------------- >Some important links for excel users: >1. Follow us on TWITTER for tips tricks and links : >http://twitter.com/exceldailytip >2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678 >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 6,800 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 Facebook Group @ http://www.facebook.com/group.php?gid=287779555678 >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 6,800 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 Facebook Group @ http://www.facebook.com/group.php?gid=287779555678 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 6,800 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 Facebook Group @ http://www.facebook.com/group.php?gid=287779555678 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 6,800 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 To unsubscribe, reply using "remove me" as the subject.