Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default when press the close button in printpreview



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 ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
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 ***
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default when press the close button in printpreview



thank you very much

*** Sent via Developersdex http://www.developersdex.com ***
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
press button via vb and excel sal21 Excel Programming 0 May 19th 06 01:52 PM
Code execution interrupted on PrintPreview close AusTexRich Excel Programming 1 October 14th 05 11:01 PM
key Press on Forms Button Todd Huttenstine Excel Programming 10 May 21st 04 07:28 PM
Proteting against a button press John Baker Excel Programming 3 October 25th 03 12:14 AM
[how to] VBA catching close/print in printpreview Héctor Miguel Excel Programming 0 August 16th 03 02:28 AM


All times are GMT +1. The time now is 06:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"