Hi Otto
I'm not too fluent in VBA (nor in english) but I had similar trouble i fixed
that way, thanks to code from Leo Heuser :
In TWK :
Private Sub Workbook_Open()
RedefinePrintPreview 'voir proc dans module1 de ce fichier
End Sub
And in a std module :
'=========dans un module standard
Public Preview As Boolean
Sub RedefinePrintPreview()
'(e-mail address removed), May 2001
Dim CBar As CommandBar
Dim Found As CommandBarControl
For Each CBar In CommandBars
Set Found = CBar.FindControl(ID:=109, recursive:=True)
If Not Found Is Nothing Then
Found.OnAction = "Pre" ' Found.OnAction = "" for default
End If
Next CBar
Preview = False 'Not necessary but informative
End Sub
Sub Pre()
Preview = True
ActiveSheet.PrintPreview
Preview = False
End Sub
'===========================
'===============
Sub ResetPrintPreview()
Dim CBar As CommandBar
Dim Found As CommandBarControl
For Each CBar In CommandBars
Set Found = CBar.FindControl(ID:=109, recursive:=True)
If Not Found Is Nothing Then
Found.OnAction = "" 'pour avoir le fonctt par défaut
End If
Next CBar
End Sub
'===========================
HTH
J@@