MrExcel Message Board

Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Mar 19th, 2002, 03:46 PM   #1
robfo0
Board Regular
 
Join Date: Feb 2002
Location: Stockton, California
Posts: 281
Default

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!

robfo0 is offline   Reply With Quote
Old Mar 19th, 2002, 04:09 PM   #2
Mark O'Brien
MrExcel MVP
 
Mark O'Brien's Avatar
 
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
Default

You can try messing about with something like this to select the correct code for the operating system:


If Environ("OS") <> "" Then
' It's NT
Else
' It's 95 or 98
End If


You should play around with this, this worked for me comparing NT4 and Win9x OS's.

HTH
__________________
Mark O'Brien

Columbus Ohio Celtic Supporters Club
Mark O'Brien is offline   Reply With Quote
Old Mar 19th, 2002, 04:18 PM   #3
Jack in the UK
Board Regular
 
Join Date: Feb 2002
Posts: 3,065
Default

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"
Jack in the UK is offline   Reply With Quote
Old Mar 19th, 2002, 04:22 PM   #4
robfo0
Board Regular
 
Join Date: Feb 2002
Location: Stockton, California
Posts: 281
Default

Thanks guys, ill figure something out, leave it to microsoft to make my life harder!
robfo0 is offline   Reply With Quote
Old Mar 19th, 2002, 04:31 PM   #5
Jack in the UK
Board Regular
 
Join Date: Feb 2002
Posts: 3,065
Default

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"
Jack in the UK is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 01:57 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes