Name of Procedure

  • Thread starter Thread starter Adept
  • Start date Start date
A

Adept

This is an extension of my previous post on Name of Procedure. I also posted
it on OzGrid without any positive answers. I hope this is not considered an
'illegal' cross-post

To reiterate, my problem is to find a +AFs-simple+AF0- way to get the name of the
routine (Sub or Function)
currently executing.

The consensus answer seem to be no.

Since the +ACI-View Stack+ACI- can get at the procedure names, one responder
suggested using the API (but no mention of what API calls might work).

Does anyone here have any ideas I might follow up on?

Thanks



The Old Grey Geeks' Lament

And we carried our bits in a bucket,
And our mainframe weighed 900 tons,
And we programmed in ones and in zeros
And sometimes we ran out of ones.
 
Hi
One way would be to insert a line in each procedure to show the current
procedure in the status bar.

Sub test()
For i = 1 To 1000
Application.StatusBar = "Test Procedure"
Next
test2
For i = 1 To 1000
Application.StatusBar = "Test Procedure"
Next
End Sub

Sub test2()
For i = 1 To 1000
Application.StatusBar = "Test2 Procedure"
Next
test
End Sub

It seems to wobbble but you should be able to improve this

Regards
Peter
 
A better order would be

Sub test()
Application.StatusBar = "Test Procedure"
For i = 1 To 5
Cells(1, 1) = i
Next
test2
For i = 1 To 5
Cells(1, 1) = i
Next
Application.StatusBar = ""
End Sub

Sub test2()
Application.StatusBar = "Test2 Procedure"
For i = 1 To 5
Cells(1, 1) = i
Next

Application.StatusBar = "Test Procedure"
End Sub

Peter
 
Back
Top