when press the close button in printpreview

  • Thread starter Thread starter x taol
  • Start date Start date
X

x taol

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....
 
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" <[email protected]>
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....
 

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

Similar Threads


Back
Top