ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   printing via vba (https://www.excelbanter.com/excel-programming/314585-printing-via-vba.html)

neowok[_77_]

printing via vba
 

I have this which is in a bit of code activated by a button.

Charts("Overall Days By Period").PrintOut

but this just prints straight out to whatever printer is currentl
selected. Is there a way to change this so that it brings up th
dialog box which asks things like which printer, how many copies etc

--
neowo
-----------------------------------------------------------------------
neowok's Profile: http://www.excelforum.com/member.php...nfo&userid=594
View this thread: http://www.excelforum.com/showthread.php?threadid=27202


Frank Stone

printing via vba
 
hi,
Application.ActivePrinter = "\\OKI-01\OKI-HP4000-01 on
Ne01:"
Application.activePrinter would be the command.
the the server file path to the printer.
the above is from my network. you will have to find out
what your's is.
Regards
Frank

-----Original Message-----

I have this which is in a bit of code activated by a

button.

Charts("Overall Days By Period").PrintOut

but this just prints straight out to whatever printer is

currently
selected. Is there a way to change this so that it

brings up the
dialog box which asks things like which printer, how many

copies etc?


--
neowok
----------------------------------------------------------

--------------
neowok's Profile: http://www.excelforum.com/member.php?

action=getinfo&userid=5940
View this thread:

http://www.excelforum.com/showthread...hreadid=272024

.


Tom Ogilvy

printing via vba
 
Application.Dialogs(xlDialogPrint).Show

--
Regards,
Tom Ogilvy


"neowok" wrote in message
...

I have this which is in a bit of code activated by a button.

Charts("Overall Days By Period").PrintOut

but this just prints straight out to whatever printer is currently
selected. Is there a way to change this so that it brings up the
dialog box which asks things like which printer, how many copies etc?


--
neowok
------------------------------------------------------------------------
neowok's Profile:

http://www.excelforum.com/member.php...fo&userid=5940
View this thread: http://www.excelforum.com/showthread...hreadid=272024




s_u_resh[_4_]

printing via vba
 

Hi Tom Ogilvy,

Great.

Thanks
S.Sures

--
s_u_res
-----------------------------------------------------------------------
s_u_resh's Profile: http://www.excelforum.com/member.php...fo&userid=1567
View this thread: http://www.excelforum.com/showthread.php?threadid=27202



All times are GMT +1. The time now is 05:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com