Well my latest version did not work either. Now I am not disabling any shapes at all and I just set the property of each shape (print object) to false manually in Excel. Works lovely on my machine (Windows7 with XP) still, but on the XP machine with Excel 2007 for some reason it hides all shapes when coming back from a print preview. There is nothing in my code now that does this!! My print routine now, in its entirity is:-
Sub printing()
Dim PrintingArea As String
Dim x As Integer
Application.EnableEvents = False
If Left(PrintedPageDescription, 3) = "Rem" Then 'We need to create print area of Remedials page.
x = 8
While Cells(x, 1) <> ""
x = x + 1
Wend
PrintingArea = "$A$1:$G$" + Trim(Str(x))
ActiveSheet.PageSetup.PrintArea = PrintingArea
End If
With ActiveSheet.PageSetup
.LeftFooter = PrintedPageDescription
.CenterFooter = Format(Now(), "dd mmm yyyy")
.RightFooter = "Page &P"
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.ScaleWithDocHeaderFooter = True
.AlignMarginsHeaderFooter = True
End With
ActiveSheet.PrintPreview EnableChanges:=False
Application.EnableEvents = True
End Sub
Again any help would be useful
Bookmarks