print preview

G

Guest

Hi,

I have a problem with .printpreview after a userform is displayed. The
following code displays userform1 but does not show the printpreview of
worksheet1. --Thanks!


Sub test()
With UserForm1
.Width = Application.Width
.Height = Application.Height
.Show vbModeless
End With
Worksheets(1).PrintPreview
End Sub
 
N

NickHK

It's a bit pointless covering the whole area in a userform, as you cannot
interact with the app under it.
Also, it seems that userform do not interact well in .PrintPreview.

What are you trying to achieve ?

NickHK
 
H

halimnurikhwan

Hi,

I think you should hide or unload the userform before .printpreview
and load or show it again after .printpreview

like

Userform1.hide
activesheet.printpreview
Userform1.show

thanks,
halim

borg menuliskan:
 
G

Guest

Thank you so much!!



Hi,

I think you should hide or unload the userform before .printpreview
and load or show it again after .printpreview

like

Userform1.hide
activesheet.printpreview
Userform1.show

thanks,
halim

borg menuliskan:
 

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