Printing Problem When Changing Printers

T

TMesh

Hi

I have written an Excel Add-In which based on the input from the client
creates a couple of new sheets in the active workbook. The sheets created
contain about 55 columns of data. So I format the PageSetup object as
follows:

'Set worksheet properties
With xlsCostToStartReport

'Activate the current sheet
.Activate
'Set the font for the sheet to Arial
.Cells.Font.Name = "Arial"
'Disabled wordwrap in coumn A
.Columns("A").WrapText = False
'Re-size range to the largest field value
.Columns.AutoFit

'Set PageSetup properties
With .PageSetup
'Set the header section of the spreadsheet
.LeftHeader = "Case: " & m_strCaseName
.CenterHeader = "&""Arial,Bold""&14Cost To Start Report" & Chr(10) &
"&""Arial,Italic""&12" & cboTurbines.Text
.RightHeader = "Date: &D" & Chr(10) & "Time : &T"
'Set the footer section of the spreadsheet
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = "Page: &P of &N"
'Set the margins of the spreadsheet
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(0.5)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.25)
'Set the page orientation to print landscape
.Orientation = xlLandscape
'Set the intial paper size to be letter (8.5 x 11)
.PaperSize = xlPaperLetter
'Set the page numbering to automatic
.FirstPageNumber = xlAutomatic
'Set the columns to repeat
.PrintTitleColumns = "$A:$B"
'Set the print order to down and over
.Order = xlDownThenOver
'Turn zoom off
.Zoom = False
'Set the number of pages wide to three
.FitToPagesWide = 4
'Set the number of pages tall to be 1
.FitToPagesTall = 1
End With

'Set the Visible property of the sheet to visible
.Visible = xlSheetVisible
'Freeze the panes to the left and top of cell B4
.Range("$C$2").Select
ActiveWindow.FreezePanes = True
'Set protection password for current sheet
.Protect "nreca!!"

End With

My problem is when I go and change printers from my local printer to a
network printer. I know the output could change a little, but what is
happening is Excel will not print the last page.

Is this a BUG? It happens in all versions of Office I am testing with
(2003,2002,2000).

Any help solving this issue would be greatly appreciated.

Tom
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top