Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi I have the code below linked to a form button , Basically the page "Sheet
1" always prints, and sheet 2 and 3 only print if the cells they look at are true, which in turn are linked by form check boxes! 'To decide what pages get printed when used with print button Sub PrintButton_Click() Sheets("Sheet1").Select Application.Dialogs(xlDialogPrint).Show 'Water audit sheets to print Sheets("Sheet2").Select If Range("Calcs!i1") = True Then ActiveWindow.SelectedSheets.PrintOut Copies:=1 End If Sheets("Sheet3").Select If Range("Calcs!f1") = True Then ActiveWindow.SelectedSheets.PrintOut Copies:=1 End If End Sub On sheet three is it possible to amend the code so that it looks at three cells to see if they are true! I would like it so that if "Calcs!f1" is true only the range A1:L8 prints If "Calcs!f2" is true only the range A1:L16 prints and If "Calcs!f3" is true the range A1:L30 prints. Thanks for any advice. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
amend a VB code please | Excel Discussion (Misc queries) | |||
Amend the Code | Excel Programming | |||
Amend code | Excel Programming | |||
Amend open Workbook code | Excel Programming | |||
Amend code or change it completely? | Excel Programming |