VB Code:
  1. Private Sub Command1_Click()
  2. '============================
  3. Dim pct As PictureBox
  4.  
  5.     MSChart1.EditCopy
  6.     Set pct = Controls.Add("VB.Picturebox", "pctTemp")
  7.     pct.AutoSize = True
  8.     pct.AutoRedraw = True
  9.     pct.Picture = Clipboard.GetData(vbCFMetafile)
  10.    
  11.     Printer.FontBold = True
  12.     Printer.FontSize = 12
  13.     Printer.FontUnderline = True
  14.     Printer.CurrentX = (Printer.Width - Printer.TextWidth("CPMS Representative Trend Report")) / 2
  15.     Printer.CurrentY = 400
  16.     Printer.Print "Daily Report"
  17.     Printer.CurrentX = Printer.CurrentX + 400
  18.     Printer.PaintPicture pct.Picture, _
  19.                          (Printer.Width - MSChart1.Width) / 2, _
  20.                          Printer.CurrentY, _
  21.                          MSChart1.Width, _
  22.                          MSChart1.Height
  23.     Printer.EndDoc
  24.    
  25.     Controls.Remove "pctTemp"
  26.     Set pct = Nothing
  27.  
  28. End Sub

I found this sub from a search on this forum,I tried it but the page is printed at the top of the page,I want the page to be printed at the center of the page(centered horizontally and centered vertically).
How can I do it?
thanks