Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() This is a piece of simple code I have in a macro at the moment - Code: -------------------- If Application.Sum(Range("L6")) 0 Then Application.ActivePrinter = "\\bristol\Canon CLC4040-H1 PS Ver1.0 2 on Ne04:" ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _ "\\bristol\Canon CLC4040-H1 PS Ver1.0 2 on Ne04:", Collate:=True End If -------------------- I need to change this code so that it loops around in some way. The cell the code is currently looking at ("L6") needs to change to ("N6"). It needs to look at N6 in Sheets - Bic_Code01 then Bic_Code02 etc up to Bic Code_20. If ("N6") is equal to one of the following codes on any of these sheets - ABA AB AC ACQ WH A ACX AKLP AGB ABQ AKC AVGM ABC APF AFPC ACV AFY JFH AFC AFF Print the Page if not move to the next sheet, look at N6 and repeat the process. So basically look at N6 on every sheet in the workbook and if it equals any of the codes print the page. I have to do this for 28 files all with 20 sheets in all with different codes. There won't always be 20 codes there might be just six so stop after the last code. Any help much appreciated. -- Timbo ------------------------------------------------------------------------ Timbo's Profile: http://www.thecodecage.com/forumz/member.php?userid=24 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=110050 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dependent page items in pivot table | Excel Discussion (Misc queries) | |||
Trace Dependent - off worksheet page reference | Excel Discussion (Misc queries) | |||
Setting the print area in page set up to print 1 page wide by 2 pages tall | Excel Discussion (Misc queries) | |||
print macro dependent on conditional format | Excel Programming | |||
Vb code to print a page # | Excel Programming |