LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
Ray Ray is offline
external usenet poster
 
Posts: 267
Default Userform within a userform ...

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
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
fill userform textbox from userform listbox clik event GregJG[_21_] Excel Programming 3 December 7th 08 04:47 PM
Is there an easy Copy/Paste of a Userform ? (Entire Userform Including tx & cbx's) Corey Excel Programming 2 January 9th 07 01:01 PM
Userform to enter values and shown in same userform in list helmekki[_104_] Excel Programming 0 November 19th 05 03:23 PM
Looping procedure calls userform; how to exit loop (via userform button)? KR Excel Programming 6 July 27th 05 12:57 PM
Activating userform and filling it with data form row where userform is activate Marthijn Beusekom via OfficeKB.com[_2_] Excel Programming 3 May 6th 05 05:44 PM


All times are GMT +1. The time now is 04:31 PM.

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"