LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Print Page Dependent On Code



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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dependent page items in pivot table TC Excel Discussion (Misc queries) 3 October 30th 09 01:00 AM
Trace Dependent - off worksheet page reference happy 111 Excel Discussion (Misc queries) 1 November 25th 07 10:51 AM
Setting the print area in page set up to print 1 page wide by 2 pages tall EA[_2_] Excel Discussion (Misc queries) 2 July 12th 07 08:39 PM
print macro dependent on conditional format mwam423 Excel Programming 4 July 6th 07 06:22 PM
Vb code to print a page # Felice[_2_] Excel Programming 1 October 18th 03 03:10 PM


All times are GMT +1. The time now is 06:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"