Name of running sub???

K

Ken Loomis

Is there a way to access the name of a current sub via VBA while a macro is
running?

TIA,
Ken
 
T

Tom Ogilvy

You can code the name of the sub with in it. Excel isn't multitasking. So
you can design the sub to know about itself.

-
Regards,
Tom Ogilvy
 
K

Ken Loomis

Thanks, Tom.

I hard coded the name of the sub into all the subs so that I can call a
routine that will adds the name of the sub to a extra sheet in the workbook
to track the progress.

I have posted that in another question because it works in my Excel 2003,
but bombs in Excel 2000.

Ken
 
T

Tom Ogilvy

If you are doing this for debugging purposes, you might use the call stack
functionality in the VBE.
 
K

Ken Loomis

Tom,

Yes, I am trying to debug my VBA. I have to send my workbooks to someone
that knows little about this stuff. And, then I am trying to get info back
to help me debug this. When you mentioned the "stack" that seemed very
appropriate. As a side note, I used to program in FORTH, which was TOTALLY
stack based. Anyone rememebr FORTH??????

Where can I look to learn more about :"call stack functionality in the VBE"?

TIA,
Ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top