View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
ypukpete ypukpete is offline
external usenet poster
 
Posts: 26
Default Print page one of sheet only

Thanks OssieMac. That is similar to the code I am using which works OK, but
if the user clicks on the cancel button in the print dialog box, it does not
cancel the printing. Is there away to correct this?
--
ypukpete


"OssieMac" wrote:

The following only allows the user to select the printer and printer setup.
Does not allow selection of pages to print. Then the second line to actually
print.

Application.Dialogs(xlDialogPrinterSetup).Show

ActiveWindow.SelectedSheets.PrintOut from:=1, to:=1, _
copies:=1, collate:=True

Note that the space and underscore at the end of a line is a line break in
an otherwise single line of code.


--
Regards,

OssieMac


"ypukpete" wrote:

I am using the code, Application.Dialogs(xlDialogPrint).Show (so the user can
select their printer) and I need to disable the Print Range in the dialog box
so that other pages cant be printed.
Is there code I can use to only print page 1 of the sheet. I have tried code
that works but if you click cancel in the dialog box it goes ahead and prints
it anyway. I hope this makes sense to one of the experts. Thanks for any help
--
ypukpete