Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Bob -
Thanks for a quick response ... tried your idea, but didn't work ... Here's the whole code segment: Private Sub CommandButton3_Click() Prnting.Show 'Adjust column-widths for printing With Sheet2 With .Range("Z1:AF1") .EntireColumn.AutoFit End With For Each C In .Columns("Z:AF") C.ColumnWidth = C.ColumnWidth * 1.5 Next .Columns("AC").ColumnWidth = .Columns("AC").ColumnWidth * 0.7 ' Set formatting With .Range("Z1:AF1") .Borders.LineStyle = xlContinuous .Borders.Weight = xlMedium .Font.Bold = True End With End With Sheet2.Range("Z1:AE1").EntireColumn.HorizontalAlig nment = xlCenter Sheet2.Range("AF1").HorizontalAlignment = xlCenter 'Set the Print-Area With Sheet2 .Range("Z1").CurrentRegion.Name = "PrintReport" With .PageSetup .PrintArea = "PrintReport" .Orientation = xlLandscape .CenterHorizontally = True .BottomMargin = 0.5 .TopMargin = 1# .LeftMargin = 0.5 .RightMargin = 0.5 .FitToPagesTall = 1 .FitToPagesWide = 1 .PrintGridlines = True .LeftHeader = "&""Verdana,Bold""& 20" & "Missed Punch Report" .RightHeader = "Printed on: " & Format(Now, "mm/dd/yy") End With End With PrintDone.Show Unload Me End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
fill userform textbox from userform listbox clik event | Excel Programming | |||
Is there an easy Copy/Paste of a Userform ? (Entire Userform Including tx & cbx's) | Excel Programming | |||
Userform to enter values and shown in same userform in list | Excel Programming | |||
Looping procedure calls userform; how to exit loop (via userform button)? | Excel Programming | |||
Activating userform and filling it with data form row where userform is activate | Excel Programming |