Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel 97-2003 PrintPreview works - 2007 Excel does not
1. This code has worked for Excel 97-2003 2. The author of the code is not available 3. Do not get consistent results 3.A. User running Excel: Subscript out-of-range 3.B. User running Excel: Print, Next, Previous, Close grayed out but Pages 1-7 indicator in left corner * This has happened with Office SP1 3.C. Using the VBA IDE in Debug Mode shows a subscript index out-of-range on the Split function * Each sheet contains a chart Code: Sub Report_View() Dim Page2 As String Dim SplitToken As Variant Dim SheetName As String If Sheets("RawData").Range("A1") < "HEADER" Then MsgBox "Please select a Test File first!" Else 'Sheets("Parameters").Range("C10") = "SI" 'Calculate Application.Calculate usrMain.Hide 'Select the correct pages and do a print preview: Select Case Sheets("Cu").Range("G2") / 6 Case Is <= 1 Page2 = "OverallReport_Page2-1" Case Is <= 2 Page2 = "OverallReport_Page2-1,OverallReport_Page2-2" Case Is <= 3 Page2 = "OverallReport_Page2-1,OverallReport_Page2-2,OverallReport_Page2-3" Case Is <= 4 Page2 "OverallReport_Page2-1,OverallReport_Page2-2,OverallReport_Page2-3,OverallReport_Page2-4" Case Else Page2 "OverallReport_Page2-1,OverallReport_Page2-2,OverallReport_Page2-3,OverallReport_Page2-4,OverallReport_Page2-5" End Select Sheets(Split("OverallReport,NetDP_vs_T,Eff_T_Plot, Eff_Avg_Plot,Eff_Avg_LogPlot," & Page2, ",", -1, 1)).Select ActiveWindow.SelectedSheets.PrintPreview Sheets("Home").Select usrMain.Show End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel PrintPreview shows fonts in different colour | Excel Discussion (Misc queries) | |||
PrintPreview of multiple sheets under Excel 2007 | Excel Programming | |||
PrintPreview problem in 2007 | Excel Programming | |||
PrintPreview in 2007 (for what it's worth...) | Excel Programming | |||
.PrintPreview | Excel Programming |