![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: Stockton, California
Posts: 281
|
Hi,
I have a problem. I have a macro in which a user selects a printer (there are 2) that is on the network. My code is as follows: Application.ActivePrinter = "LX300 HALL on \Bacevedolx300 Hall" But this code only works for windows 98 computers. When i recorded a macro on one of our windows 2000 computers, the code changes as follows: Application.ActivePrinter = "\BACEVEDOLX300 HALL on Ne01:" Is there a generic way to make this selection work for all operating systems? (by the way, the Ne01 i think depends on the order in which the printers are installed, so this may vary also.). These are the same printer but they are defined differently on different operating systems, I would really like to get the macro to work. Appreciate any help, thanks! |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
You can try messing about with something like this to select the correct code for the operating system:
You should play around with this, this worked for me comparing NT4 and Win9x OS's. HTH |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Posts: 3,065
|
Hi
First remember Win98 was aweful, no it really was and SE2 was bad and Me was a mess, that out the way W98 likeW95 is domestic and will be friendly, if weak .. But W2Y is NT5 as such and so is totally different and will work totally different, Wy2 is OK a OP's go XP better if patched, so the business says. Now W2K will have different calls thn W95 / 8 I try not to write scripts that jump OP's for these reason essentiall they are the same but have odd quirk, add that Novel or bespokes and fun and games are us. You need to have codes to test OP and case select to run if 95 or 98 against NT version . Problem i know that conflict Printing is noteriousely frawt with issues. never works well. Assigning emails on scripts Calling reg codes in setup scripts, in rocket science scripts. Ive had page setups bounce about never solved if how software loaded or windows. Remeber this Excel cant print! True it asks windows nicly to do it via print manager. not a lot of people know this but Windows check the drivers fully before ever print, why ive no idea one a boot would do but thats why printing delays prior to execution of print. Now Windows check different to each, so the drivers need to be compatable ir Win95/8 are same but nothing like the NT4 drivers and WY2K drivers so will go a bit made thus the case select check idea. NOW what the difference said all that. the print drivers are required are the DLL files that set print things to makke the print fire and work ie WYSIWYK... else it will spoil. Hope thats of some help.. Oh Fix... select case to test OP or drivers..
__________________
Free Excel based Web Toolbar available here. Jack in the UK J & R Excel Solutions "making Excel work for you" |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Location: Stockton, California
Posts: 281
|
Thanks guys, ill figure something out, leave it to microsoft to make my life harder!
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Posts: 3,065
|
Hi
Funny i dont blame Microsoft for this, and as you will; know reading my post ill have goes at Microsoft over the day of the week if i could for their incompleate version they chuck out and if a few days developing Excel it would be REALLY REALLY cool not just Super cool! Win95/8 are domestic products, WY2K is commercial Domestic = home Commercial = work OK wonderful Microsoft have pulled the plug on 85 and 8 just for fun forcing updates esle registered software is no longer supported. so my original purchased joins win3.1 and 3.11 in the bin as worthless, and upgrade stink and even worse quatlity.. Did you know full or upgrade W95 was only serial number different, so depending what SN entered depended on what you got installed full or ungrae also starnge was OEM and DSP all on the same disk??? odd that. So its a bit harsh to compair these two OP's like For 2 wheel drive and 4by4 same ish....
__________________
Free Excel based Web Toolbar available here. Jack in the UK J & R Excel Solutions "making Excel work for you" |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|