I have created a VBA program in Excel that is fairly complex... the program basically graphs and reformats data that has been
imported into excel and also retrieves information from an Access database and places this data near the title of the charts.
A few other people in the company are going to be using this program so I have two questions:
Since we use network printers, the name of the printer in the code, for example
Application.ActivePrinter = "ABCDEFGA123456 on Ne05:"
If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
, changes depending on the computer it is installed on (my computer might say "... on Ne05" and another co-worker may
have "...on Ne03")... also with different versions of Excel rolled out every few years the complete printer names also
change. How can I make this program more robust so a VB error message doesn't pop up, scare the user, and prevent the
program from continuing? Is there a way for a function in VB to automatically find the printers installed on the machine and
select the most appropriate one or have the user select the printer?
2) In addition, there is a copy of an Excel
workbook called "Personal.xls" in my Startup folder that opens everytime I run Excel... in this workbook (Personal.xls) I
have the modules with code.. what is the best and easiest way to distribute this code for other users? Giving them a copy of
Personal.xls and explaining how to place in the startup folder seems kind of clumsy. Also the code executes using the
shortcut ctrl-a, which a normal user may not figure out...
Thanks in advance,