Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
Macro Question with printing in MS Excel?
I'm admittedly not the best with writing macros. I've got a macro written that when you push a button, the set print area will print. What I'm trying to do is to specify where it prints to. I'd like it to print to PDF every time the button is clicked. But it seems like whatever the last selected printer is, it will print there.
Does anyone know how to specify a printer to print to within an excel macro?
That's just it...this program isn't just for me. It's for a whole bunch of ppl. So having everyone's default printer as Adobe PDF would be more trouble than it's all worth. But anyways I found the specific coding I was looking for in a MS Office help forum.
2 Answers
- Anonymous1 decade agoFavorite Answer
If you have adobe acrobat installed, it will also install "Acrobat PDFWriter" option in the print menu. Make this the default printer. and try again.
Source(s): Have used excel for a number of years. - hawbakerLv 45 years ago
To print, link a button to a macro, with this code contained in the macro ActiveWindow.SelectedSheets.PrintOut Copies:=a million, Collate:=genuine Edit: For some reason Yahoo truncates the textual content of my answer. The bit after "SelectedSheets" says "PrintOut" then an section before the note "Copies"