ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Show print dialog box (https://www.excelbanter.com/excel-programming/359592-show-print-dialog-box.html)

Jack Sheet

Show print dialog box
 
Hi all
I have a line of code:
If .Range("AbsValue").Value 0 Then .PrintOut

This sends the identified range to the default printer.
I would prefer if it opened the standard dialog box that prompts you to
select the printer first, and vary as desired the printer properties.
In other words, I want it to behave as though you clicked on File/Print from
the menu bar, instead of clicking on the printer icon from the standard
toolbar.

How to achieve this, please?
Still using Office 97 :-(

Many thanks.

--
Return email address is not as DEEP as it appears



Dave Peterson

Show print dialog box
 
Maybe...


With Worksheets("sheet1")
If .Range("AbsValue").Value 0 Then
Application.Dialogs(xlDialogPrinterSetup).Show
.PrintOut preview:=True
End If
End With

or maybe
Application.Dialogs(xlDialogPrint).Show



Jack Sheet wrote:

Hi all
I have a line of code:
If .Range("AbsValue").Value 0 Then .PrintOut

This sends the identified range to the default printer.
I would prefer if it opened the standard dialog box that prompts you to
select the printer first, and vary as desired the printer properties.
In other words, I want it to behave as though you clicked on File/Print from
the menu bar, instead of clicking on the printer icon from the standard
toolbar.

How to achieve this, please?
Still using Office 97 :-(

Many thanks.

--
Return email address is not as DEEP as it appears


--

Dave Peterson

Jack Sheet

Show print dialog box
 

Thanks - just what I needed

"Dave Peterson" wrote in message
...
Maybe...


With Worksheets("sheet1")
If .Range("AbsValue").Value 0 Then
Application.Dialogs(xlDialogPrinterSetup).Show
.PrintOut preview:=True
End If
End With

or maybe
Application.Dialogs(xlDialogPrint).Show



Jack Sheet wrote:

Hi all
I have a line of code:
If .Range("AbsValue").Value 0 Then .PrintOut

This sends the identified range to the default printer.
I would prefer if it opened the standard dialog box that prompts you to
select the printer first, and vary as desired the printer properties.
In other words, I want it to behave as though you clicked on File/Print
from
the menu bar, instead of clicking on the printer icon from the standard
toolbar.

How to achieve this, please?
Still using Office 97 :-(

Many thanks.

--
Return email address is not as DEEP as it appears


--

Dave Peterson





All times are GMT +1. The time now is 03:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com