PDA

View Full Version : Print code



mqdias
11-05-2007, 04:44 AM
Hi,

I have a button for print instructions. I already have 2 codes possible to use in this commandbutton, but neither of both makes what i want.

1)
ActiveWindow.SelectedSheets.PrintOut
2)
ActiveWindow.SelectedSheets.PrintPreview

I want to make appear that 1st window when we click "pint", so that i can choose my printer and not onde of the 2 codes written above.

thanks

Bob Phillips
11-05-2007, 05:39 AM
Look at

Dialogs in VBA help with an argument of xlDialogPrint.

mqdias
11-05-2007, 08:10 AM
Hi,

Thank you for the attention!

I've searched, but i didn't find what i'm looking for.

I've attached now, a image with the dialog box that i wat to generate by code, wich is the same that clicking: File->Print.

The dialog is in Portuguese, but i think you can see what is.

thank you once more!

lucas
11-05-2007, 08:29 AM
A quick search of the forum found this:

http://vbaexpress.com/forum/showthread.php?t=15647

seems to be exactly what you are looking for.

mqdias
11-05-2007, 09:10 AM
Lucas,

As you may notice, i've posted a reply in that thread you told me about.
I ask you to go there and take a look to my problem...if you can of course.

Thanks for the help