Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Printer selection over network

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Location
    Stockton, California
    Posts
    281
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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!


  2. #2
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Posts
    3,184
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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"

  4. #4
    Board Regular
    Join Date
    Feb 2002
    Location
    Stockton, California
    Posts
    281
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks guys, ill figure something out, leave it to microsoft to make my life harder!

  5. #5
    Board Regular
    Join Date
    Feb 2002
    Posts
    3,184
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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"

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •