Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is my challenge Someone helped me right the following code
that automatically selects the number of pages to print. But... I would like to use a check box in the workbook to put a True or False in a cell, for example S1 that would disable the above code. End goal: Some users could ignore the check box and the worksheet would print as many pages as are indicated in S2 and the more advanced users could check the box, thus returning the print parameters to them enabling them to select any combination of pages to print. Private Sub Workbook_BeforePrint(Cancel As Boolean) Dim rng As Range Set rng = ActiveSheet.Range("S2") On Error GoTo XIT Application.EnableEvents = False Cancel = True ActiveSheet.PrintOut from:=1, to:=rng.Value XIT: Application.EnableEvents = True End Sub Any ideas? Thanks for your time.... |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Disable autoformat of "true" and "false" text | Excel Discussion (Misc queries) | |||
=IF(VLOOKUP(C11,Group,2,FALSE)=D11,"True","Not Valid") and =IF(D1 | Excel Worksheet Functions | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel | |||
IF(VLOOKUP("MYDATA", MYNAME, 4) = 0, "TRUE", "FALSE") | Excel Programming |