Hi,
I need some detective work done on my code. I have a function that is
meant to return a string (see below). To a point, it seems to work
fine, i.e. if I break at Line X, strResult = "By"; if I break at Line Y,
ExtractElement = "By". However the function is not returning "By", but
an empty string. How is this possible, and how can I fix it?
________________________
Public Function ExtractElement _
(strLine As String, strOutputType As String) As String
On Error Goto ErrorHandler
Dim strResult As String
... code ...
ExitProcedure:
ExtractElement = strResult 'Line X
Exit Function 'Line Y
ErrorHandler:
MsgBox Err.Description, vbExclamation, "Error " & Err.Number
strResult = ""
Resume ExitProcedure
End Function
________________________
Thanks,
------------
LoopyNZ
------------
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!