LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Obtain Name of Function or Sub

Thanks Peter - that helps... you gave me some new ideas. Much appreciated

Roger

"Peter T" <peter_t@discussions wrote in message
...
Just for ideas -

Sub test()
Dim v
On Error GoTo errH
v = "a" ' mismatch
' v = 1 ' div by zero
test2 v
Exit Sub
errH:
MsgBox Err.Description
End Sub

Sub test2(v)
On Error GoTo errH
10
20
30 test3 v
40
Exit Sub
errH:
s = "test2, line:" & Erl & vbCr & Err.Description
Err.Raise 12345, , s
End Sub

Sub test3(v)
On Error GoTo errH
10
20
30 v = v / 0
40
Exit Sub
errH:
s = "test3, line:" & Erl & vbCr & Err.Description
Err.Raise 12345, , s
End Sub

Regards,
Peter T

"Roger Smith" wrote in message
...
Hi Experts

I would like to include the name of the current function or subroutine in

my
error handler output. Is there any property that will provide the name or
context of the current point in the call chain?

Thanks much,

Roger






 
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
Need hyperlink function to obtain range name from a cell (contents DW Excel Worksheet Functions 4 January 12th 08 11:07 PM
Function cannot obtain cell values [email protected] Excel Programming 1 December 3rd 07 04:04 AM
How do I obtain the address of a cell using the vlookup function? Spock Excel Worksheet Functions 2 May 16th 05 06:35 PM
Would like to Obtain a Cell Address from a vlookup function CR_2004_04_08 Excel Programming 3 April 9th 04 11:12 AM
How to obtain multiple quantities from an Excel VB function? Tom Kreutz Excel Programming 1 December 10th 03 05:44 PM


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