Thread: Error Handling
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Bridges[_2_] Bob Bridges[_2_] is offline
external usenet poster
 
Posts: 257
Default Error Handling


What do you mean by "pause", Burnnie? Does it run reeaaallly sloooowwwly,
like one or two seconds for each statement (and how do you know?)? Or do you
mean it stops after every statement and asks you to hit a button to proceed
(and if so how does it do that and what button do you hit)? Or what?

Oh, and what do you mean by "seemingly without any changes"? Do you mean
that there were changes but they were really really minor (and if so, what
were they)? Or do you mean you don't know of any changes at all but there
must have been a change because now it acts differently? Or what?

--- "Burnnie Holliday" wrote:
I have a problem with the following subroutine. The files that it opens are
located in one of two locations, and it accomplishes this regardless of what
folder the file is located in. The problem is that it pauses execution
everytime any line in that particular subroutine gets run. What's more
confusing is that before, it worked perfectly, and seemingly without any
changes, suddenly this bug cropped up.

Sub OpenMatFile(FileName As String)
On Error Resume Next
Workbooks.Open MatPath & FileName, UpdateLinks:=False, ReadOnly:=True
If Err.Number < 0 Then
Workbooks.Open MatPath & "2009 Material Archives\" & FileName,
UpdateLinks:=False, ReadOnly:=True
End If
End Sub