Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default print preview

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default print preview

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

"borg" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 113
Default print preview

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:
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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default print preview

Thank you so much!!



" wrote:

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:
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



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
Plot Area Automatically Expands in Print and Print Preview Myk D. Charts and Charting in Excel 2 March 12th 09 01:41 PM
Print and Print Preview Graphic Moving Resizing 2007/2003 Adam Rayburn Excel Discussion (Misc queries) 0 April 4th 07 04:18 PM
print preview v page break preview SamB Excel Discussion (Misc queries) 0 November 16th 06 05:09 PM
cell borders that I create dont show on print preview or print scott3435 Excel Discussion (Misc queries) 2 April 6th 06 02:37 AM
Why does macro speed slow after Excel Print or Print Preview? Larry A[_3_] Excel Programming 6 May 16th 05 11:22 AM


All times are GMT +1. The time now is 08:05 PM.

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"