Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default Name of running sub???

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

TIA,
Ken


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Name of running sub???

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

"Ken Loomis" wrote in message
...
Is there a way to access the name of a current sub via VBA while a macro

is
running?

TIA,
Ken




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default Name of running sub???

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


"Tom Ogilvy" wrote in message
...
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

"Ken Loomis" wrote in message
...
Is there a way to access the name of a current sub via VBA while a macro

is
running?

TIA,
Ken






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Name of running sub???

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

--
Regards,
Tom Ogilvy

"Ken Loomis" wrote in message
...
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


"Tom Ogilvy" wrote in message
...
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

"Ken Loomis" wrote in message
...
Is there a way to access the name of a current sub via VBA while a

macro
is
running?

TIA,
Ken








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default Name of running sub???

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


"Tom Ogilvy" wrote in message
...
If you are doing this for debugging purposes, you might use the call stack
functionality in the VBE.

--
Regards,
Tom Ogilvy

"Ken Loomis" wrote in message
...
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


"Tom Ogilvy" wrote in message
...
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

"Ken Loomis" wrote in message
...
Is there a way to access the name of a current sub via VBA while a

macro
is
running?

TIA,
Ken












  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Name of running sub???

http://msdn.microsoft.com/library/de...uggingcode.asp

Make sure the TOC is visible on the left, look at the sub topics.

--
Regards,
Tom Ogilvy

"Ken Loomis" wrote in message
...
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


"Tom Ogilvy" wrote in message
...
If you are doing this for debugging purposes, you might use the call

stack
functionality in the VBE.

--
Regards,
Tom Ogilvy

"Ken Loomis" wrote in message
...
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


"Tom Ogilvy" wrote in message
...
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

"Ken Loomis" wrote in message
...
Is there a way to access the name of a current sub via VBA while a

macro
is
running?

TIA,
Ken












Reply
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
Running Sum Jessica Excel Worksheet Functions 1 March 11th 10 07:10 PM
RUNNING Avg - how? Boswell Excel Discussion (Misc queries) 2 November 11th 08 04:43 AM
running sum Pammy Excel Discussion (Misc queries) 1 October 13th 07 09:37 PM
Keep Running Tab sarah Excel Discussion (Misc queries) 3 March 21st 07 04:33 PM
Running Add-In from VBA BillCPA Excel Discussion (Misc queries) 1 April 4th 06 04:48 PM


All times are GMT +1. The time now is 03:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"