Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Error handling

What I would like to do:

If Not IsError(ChDir [B5]) Then
ChDir [B5]
more code
End If

But of course IsError isn't for this kind of error. How should I do it?

Thanks,
Tim C


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default Error handling

On Error Resume Next
ChDir [B5]
If Err.Number = 0 Then
'more code
Debug.Print "ok"
Else
'deal w/error
Debug.Print Err.Number
End If


--
Bob Kilmer


"Tim C" wrote in message
...
What I would like to do:

If Not IsError(ChDir [B5]) Then
ChDir [B5]
more code
End If

But of course IsError isn't for this kind of error. How should I do it?

Thanks,
Tim C




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
Error Handling Kevin Excel Discussion (Misc queries) 4 June 19th 08 12:31 AM
Handling #NUM! error Michel Khennafi Excel Worksheet Functions 1 February 26th 07 08:49 PM
Error handling John Pierce Excel Programming 3 October 3rd 03 12:17 PM
Error Handling Rob Bovey Excel Programming 0 August 7th 03 12:11 AM
Error Handling Bill Lunney Excel Programming 0 August 6th 03 11:56 PM


All times are GMT +1. The time now is 09:48 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"