Print Preview & Custom Menu Bars

T

toocold

Good afternoon.

I have a user form which will allow a user to select print preview t
view the document. The problem I have run into is that after the use
has viewed the document in print preview, I don't know how to make ge
the user back to a userform. Right now the basic code is:

Private Sub PreviewGOF_Click()

SetupComplete.Hide

ActiveSheet.PageSetup.PrintArea = "$A$1:$F$40"
ActiveWindow.SelectedSheets.PrintPreview

End Sub

Any ideas on how I might get back to the userform when the user select
the close option in print preview? Also, any ideas on how to customiz
the menu bar in print preview? I would only like to have the followin
options: zoom, print, close.

Thanks in advance for any assistance!
cheers,
d
 
T

Tom Ogilvy

ActiveWindow.SelectedSheets.PrintPreview False

is about the best you can do

Look at SetFocus method.
 
T

Tom Ogilvy

If you are showing it modally (the default), maybe it is as simple as:

Private Sub PreviewGOF_Click()

SetupComplete.Hide

ActiveSheet.PageSetup.PrintArea = "$A$1:$F$40"
ActiveWindow.SelectedSheets.PrintPreview
SetupComplete.Show
End Sub
 

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

Top