View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default when press the close button in printpreview

You have to do it all in the same sub.
Something along the lines of...

Private Sub CommandButton1_Click()
Me.Hide
ActiveSheet.PrintPreview
Excel.ActiveWindow.View = xlNormalView
DoEvents
Me.Repaint
Application.ScreenUpdating = True
Me.Show
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"x taol"
wrote in message
Private Sub CommandButton1_Click()
Me.Hide
ActiveSheet.PrintPreview
End Sub

and, press the close button in printpreview screen, and then show the
userform.
how coding....
*** Sent via Developersdex http://www.developersdex.com ***