Excel VBA Basics #31 Send Sheets Straight to Printer using PrintOut Method

preview_player
Показать описание

Rather than triggering a print preview, sometimes you'll just want your report or sheet to go straight to the printer. With this trick, you can set it up on a worksheet, userform or in your actual report code, but you can send how many copies of whatever you want straight to the printer without any extra unnecessary clicks. Check it out!!

Fantastic Developer Tools:
Рекомендации по теме
Комментарии
Автор

.... i want to share you can also press <ctrl + break> in the keyboard if you lock up.

saroruipinoyofw
Автор

Here is a sample for those of you who might be interested.
Sub iActiveSheet_Print()
' First choose a printer


' Make final arrangements and setup
ActiveSheet.PrintPreview

' Print like there is no tomorrow
ActiveSheet.PrintOut
End Sub

vicsar
Автор

Thanks for the lesson...you make it easy to understand...

yusufsmile
Автор

Merry Christmas everyone. I hope God blesses you richly this upcoming year. Remember, you ARE a success!! Believe it, be it! Blessings my friends!! Dan

ExcelVbaIsFun
Автор

Good job, enjoyed all the troubleshooting. Nothing ever works perfect the first time and you show how to resolve stuff. Hope you get the printer working. Funny, where did you get the print out idea? Hmmm? :)

krn
Автор

Hello Dan, thank you for your videos. I want to use this feature to print a worksheet to PDF, without having to change the printer selected to "Adobe PDF". Is there a way to do that using VBA?

Thanks

prnyc
Автор

awesome VBA trick.
I use for several clients.
It seems to fail on MAC-OS  can you help?

BernadetteCalado
Автор

Super videos, so very useful, thanks

wayneaskey
Автор

Can I create a button to print external pdf file on desktop or I can't?

AhmedMohamed-vmob
Автор

Can I create a VBA that you can print to certain printer? But also Print copies based off of a cell value

johnweidner
Автор

That's a nice piece of code you got there! Problem is, I lose comma decimal separator after .PrintOut Preview.=TrueWhen i set to False, everything is Ok. After nearly 3 years still searching for solution, and solution isn't ....

ObuLg
Автор

instead of going in the task manager and ending the application... in this way you will not loose unsave file.

saroruipinoyofw
Автор

Am I the only who was freaked out by the use of "Sheet1.Printout. .." instead of the declared "ssheet"? :)

ChristophKleine
Автор

Hey Dan, thanks for the Great Videos. I did the same think you're doing in this video. and I don't have problems with the code. my code read has follow:
Private Sub CommandButton4_Click()
        Dim r As Integer
        r = InputBox("Cuantas Copias desea ? ", "Cantidad")
        Sheet1.PrintOut copies:=r, preview:=True
        Sheet1.PrintOut
End Sub
that allows you to see the preview and once closed it prints the qty in store in the variable r
the difference is I'm not using a form to do it
have a nice day

FanoelGutierrez