T
Timbo
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.
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.