Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default UserForm PrintPreview & Print buttons

Greetings and TIA for your time
I am a userform newbie
Using John Walkenbach's temp gif file method for showing a chart in a user
form, I've added a command button to my userform to get a print preview of a
chart:

Private Sub PrintPreviewButton_Click()
Sheets("Data").ChartObjects(1).Chart.PrintPreview
End Sub

This displays the print preview window, but the userform stays on top, has
the focus and cannot be closed. How do i give the focus to the print preview
window and (1) leave the userform open in the background, or (2) close the
user form.

Also from a userform command button I would like to show the Print dialogue
that normally appears from the file/print menu. This would need to be preset
ready to print the chart from the code above.
--
David
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default UserForm PrintPreview & Print buttons

before you do the print preview, hide the userform

Userform1.hide

--
Regards,
Tom Ogilvy

"David" wrote in message
...
Greetings and TIA for your time
I am a userform newbie
Using John Walkenbach's temp gif file method for showing a chart in a user
form, I've added a command button to my userform to get a print preview of

a
chart:

Private Sub PrintPreviewButton_Click()
Sheets("Data").ChartObjects(1).Chart.PrintPreview
End Sub

This displays the print preview window, but the userform stays on top, has
the focus and cannot be closed. How do i give the focus to the print

preview
window and (1) leave the userform open in the background, or (2) close the
user form.

Also from a userform command button I would like to show the Print

dialogue
that normally appears from the file/print menu. This would need to be

preset
ready to print the chart from the code above.
--
David



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default UserForm PrintPreview & Print buttons

Thanks Tom for your response...
How can I get the print dialogue box to show from a userform?
--
David


"Tom Ogilvy" wrote:

before you do the print preview, hide the userform

Userform1.hide

--
Regards,
Tom Ogilvy

"David" wrote in message
...
Greetings and TIA for your time
I am a userform newbie
Using John Walkenbach's temp gif file method for showing a chart in a user
form, I've added a command button to my userform to get a print preview of

a
chart:

Private Sub PrintPreviewButton_Click()
Sheets("Data").ChartObjects(1).Chart.PrintPreview
End Sub

This displays the print preview window, but the userform stays on top, has
the focus and cannot be closed. How do i give the focus to the print

preview
window and (1) leave the userform open in the background, or (2) close the
user form.

Also from a userform command button I would like to show the Print

dialogue
that normally appears from the file/print menu. This would need to be

preset
ready to print the chart from the code above.
--
David




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default UserForm PrintPreview & Print buttons

application.Dialogs(xlDialogPrint).Show

--
Regards,
Tom Ogilvy


"David" wrote in message
...
Thanks Tom for your response...
How can I get the print dialogue box to show from a userform?
--
David


"Tom Ogilvy" wrote:

before you do the print preview, hide the userform

Userform1.hide

--
Regards,
Tom Ogilvy

"David" wrote in message
...
Greetings and TIA for your time
I am a userform newbie
Using John Walkenbach's temp gif file method for showing a chart in a

user
form, I've added a command button to my userform to get a print

preview of
a
chart:

Private Sub PrintPreviewButton_Click()
Sheets("Data").ChartObjects(1).Chart.PrintPreview
End Sub

This displays the print preview window, but the userform stays on top,

has
the focus and cannot be closed. How do i give the focus to the print

preview
window and (1) leave the userform open in the background, or (2) close

the
user form.

Also from a userform command button I would like to show the Print

dialogue
that normally appears from the file/print menu. This would need to be

preset
ready to print the chart from the code above.
--
David






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
have toggle buttons but everytime print preview buttons move TinSandhu Excel Discussion (Misc queries) 1 October 11th 06 02:57 PM
Printpreview problem - disable various buttons Raymond Excel Programming 1 April 7th 05 10:17 PM
ActiveX Controls moving upon print/printpreview Steven Cheng Excel Discussion (Misc queries) 6 February 2nd 05 03:31 AM
Macro buttons tiled after print / print preview Eddie Chan Excel Programming 2 January 1st 05 02:50 PM
[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 02:34 PM.

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

About Us

"It's about Microsoft Excel"