Show print dialog box

J

Jack Sheet

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.
 
D

Dave Peterson

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
 
J

Jack Sheet

Thanks - just what I needed

Dave Peterson said:
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
 

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