Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default error handler, goto errgetfile

I will repost.

"Janis" wrote:

Our network printer can change from 01 to 09. right now it is 02 but if they
change it on the network then the print macros don't work. I would like a
case statement so it just tries all the possibilities or gives the user a
message or a loop but I don't know how to do it.


On Error GoTo errGetFile
' the network number can change, if error try another number between
1 ... 9
Application.ActivePrinter = "\\martinezfs1-bay\Ca-Martinez-94C on
Ne02:"
Exit Sub
' handle possible printer exceptions
errGetFile

Application.ActivePrinter = "\\martinezfs1-bay\Ca-martinez-94C on
Ne01:"

Else
MsgBox " warning there is a problem with the printstring."
Resume Next


tia,

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
On Errror Goto Error handler only works first time through "For Each" cycle [email protected] Excel Programming 2 May 11th 07 09:31 PM
Error Handling - On Error GoTo doesn't trap error successfully David Excel Programming 9 February 16th 06 05:59 PM
Form Err.Raise error not trapped by entry procedure error handler [email protected] Excel Programming 1 February 8th 06 10:19 AM
Error Handler dht[_2_] Excel Programming 5 August 19th 04 08:51 AM
error handler Fleur Excel Programming 1 November 20th 03 06:06 AM


All times are GMT +1. The time now is 03:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"