Hi,
I have a spreadsheet that prints to the default printer when a button is pressed. Up until now this has been fine, but now we are installing network printers and the user in question will have a b&w Laser as her default. I now want to change the macro to ask which printer to print to - which is where I am a little stuck as my VBA at this level is less than brilliant!
Code I have used is as follows:
Application.ActivePrinter = "\\ipp://10.1.9.50\HPLJ410DTN on Ne05:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"\\ipp://10.1.9.50\HPLJ410DTN on Ne05:", Collate:=True
This sends to HPLJ410DTN printer, but I don't want to hard code the printer name in there.
Any help is gratefully received
I have a spreadsheet that prints to the default printer when a button is pressed. Up until now this has been fine, but now we are installing network printers and the user in question will have a b&w Laser as her default. I now want to change the macro to ask which printer to print to - which is where I am a little stuck as my VBA at this level is less than brilliant!
Code I have used is as follows:
Application.ActivePrinter = "\\ipp://10.1.9.50\HPLJ410DTN on Ne05:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"\\ipp://10.1.9.50\HPLJ410DTN on Ne05:", Collate:=True
This sends to HPLJ410DTN printer, but I don't want to hard code the printer name in there.
Any help is gratefully received