Finding out Printers

Ad_B

Board Regular
Joined
Nov 5, 2009
Messages
182
Hi Gurus!

Been a while since I posted on here, so hello again! :laugh:

Basically, I need some code that gives the result of what printers are available to the user, and the'r directory's/ports

I know I can find them out manually by using a macro then "printing", but I don't want the user to have to do that.

I'm leaving my current job and leaving a simple system I have designed to be used by my colleagues. Any new staff will need to use this system and I need this code to generate the printer ports for them.

Hope this makes sense to some of you.

Cheers
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Would something like this help without using API methods.

Good luck with the New Job.
<font face=Courier New><SPAN style="color:#00007F">Sub</SPAN> SetPrinter()<br>    <SPAN style="color:#00007F">Dim</SPAN> PrtName<br>     <br>    PrtName = Application.Dialogs(xlDialogPrinterSetup).Show<br>    <SPAN style="color:#00007F">If</SPAN> PrtName = <SPAN style="color:#00007F">False</SPAN> <SPAN style="color:#00007F">Then</SPAN> <SPAN style="color:#00007F">Exit</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br>     <br>    MsgBox ActivePrinter<br>     <br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br></FONT>
 
Upvote 0
Thanks, thats great.

The code produces a window displaying the available printers. Can this be copied into a spreadsheet at all, as part of the code, rather than being displayed as a message box?

Thanks
 
Upvote 0
I'm not sure what that does - seems very advanced for me.

Just looked again at your previous suggestion and I think I may have not clearly stated what I want.

I currently have two printers I frequently use in the office:

\\ukclaprt001\HP9040-KLE on Ne03:
\\ukclaprt001\MFP9500-KLE on Ne04:

Each user will have \\ukclaprt001\HP9040-KLE and \\ukclaprt001\MFP9500-KLE, but the ports will be different, i.e. the Ne03 or Ne04. For example, one of the users has Ne02.

I hope this makes more sense Trevor.
 
Upvote 0

Forum statistics

Threads
1,224,596
Messages
6,179,807
Members
452,944
Latest member
2558216095

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top