LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default error handling off??

Look in the VBE on his computer and see what the options (tools=Options)
are for error handling. I suspect he is set to break on all errors.
--
Regards,
Tom Ogilvy

"Kriese" wrote in message
...
In excel vba, i am converting a workbook to a pdf.
To do this i need to change the active printer to that of the adobe pdf
converter.
but for some reason, the name of this printer changes. ie. 'Adobe PDF on
Ne01' to 'Adobe PDF on Ne02'. To deal with this, i loop through ne01 to

ne99
and try to set it to the first one it can. this works fine one my

computer,
my co-workers computer etc. However, there is one co-workers computer

that
it does not work on. We are all using the same newly installed version of
excel 2003. His computer thows an error when it tries to set the active
printer to 'Adobe PDF on Ne01' and does not go to the line as designated

in
On Error goto NextNumber. it is as though it ignors the onerror
command...below is my code. is there any way that he has error checking

OFF?
thank you for your time

printed = false
printerNumber = 1
'look for the active adobe printer, changes on every restart
While printed = False And printerNumber <= 99

If printerNumber 9 Then
On Error GoTo nextNumber
Application.ActivePrinter = "Adobe PDF on Ne" &
printerNumber & ":"
Else
On Error GoTo nextNumber
Application.ActivePrinter = "Adobe PDF on Ne0" &
printerNumber & ":"
End If
printed = True
'print out on the active printer
ActiveWorkbook.PrintOut Copies:=1, Collate:=False
nextNumber:
printerNumber = printerNumber + 1
Wend



 
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
Error Handling AA2e72E[_2_] Excel Programming 0 April 27th 04 04:06 PM
Error Handling Todd Excel Programming 1 February 13th 04 11:29 PM
Error Handling James Agostinho Excel Programming 1 January 30th 04 06:40 AM
Error handling John Pierce Excel Programming 3 October 3rd 03 12:17 PM
Error Handling Bill Lunney Excel Programming 0 August 6th 03 11:56 PM


All times are GMT +1. The time now is 01:45 AM.

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"