Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
as user only has two choices (yes or no) try using a message box.
Sub Printseuplandscape() Dim Fitp As Variant Application.ScreenUpdating = False With ActiveSheet .PageSetup.PrintArea = ActiveRange With .PageSetup .PrintTitleRows = "" .PrintTitleColumns = "" End With .PageSetup.PrintArea = Selection.Address With .PageSetup .LeftHeader = "" .CenterHeader = "" .RightHeader = "" .LeftFooter = "&D-&T" .CenterFooter = "&P of &N" .RightFooter = "&Z&F-&F-&A" .FitToPagesWide = 1 msg = MsgBox("Do you want to Fit to one page?", 36, "Page setUp") If msg = 6 Then fitpg = 1 Else fitpg = False End If .FitToPagesTall = fitpg .PrintErrors = xlPrintErrorsDisplayed End With End With Application.ScreenUpdating = True End Sub -- jb "al" wrote: Can someone correct macro below pls - why is my "false" input not working - thxs Sub Printseuplandscape() ' ' Dim Fitp Application.ScreenUpdating = False ' ActiveSheet.Pagesetup.PrintArea = ActiveRange With ActiveSheet.Pagesetup .PrintTitleRows = "" .PrintTitleColumns = "" End With ActiveSheet.Pagesetup.PrintArea = Selection.Address With ActiveSheet.Pagesetup .LeftHeader = "" .CenterHeader = "" .RightHeader = "" .LeftFooter = "&D-&T" .CenterFooter = "&P of &N" .RightFooter = "&Z&F-&F-&A" . .FitToPagesWide = 1 Fitpg = Application.InputBox _ (Prompt:="To fit to 1 page type 1.", Default:="False", Title:="Fit to page tall", Type:=1) .FitToPagesTall = Fitpg .PrintErrors = xlPrintErrorsDisplayed End With Application.ScreenUpdating = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
set area in excel not giving me option to set print area? | Excel Discussion (Misc queries) | |||
File, print area, clear area, is not working | New Users to Excel | |||
print area across the freeze panes area | Excel Worksheet Functions | |||
Macro - Set Print Area for Changing Data Area | Excel Programming | |||
How do you turn off a print area for a page? (no print area) | Excel Discussion (Misc queries) |