Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Address Subroutine Name from within Sub

Hi folks,

Is there any way to refer to a subroutines name from within the
subroutine itself in the same way that you can have:

ActiveWorkbook.Name

Thanks,
Al
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Address Subroutine Name from within Sub

Al,

I don't think that there is any way that you can get this information from
the system, VBA, or Excel.

To get what you want, I think you would have to manage it all yourself.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Al" wrote in message
om...
Hi folks,

Is there any way to refer to a subroutines name from within the
subroutine itself in the same way that you can have:

ActiveWorkbook.Name

Thanks,
Al



  #3   Report Post  
Posted to microsoft.public.excel.programming
jaf jaf is offline
external usenet poster
 
Posts: 300
Default Address Subroutine Name from within Sub

Why would you ever need to?

sub test()
test 'recursive call
if a<"" then test 'ditto
end sub


--
John
johnf 202 at hotmail dot com


"Al" wrote in message
om...
| Hi folks,
|
| Is there any way to refer to a subroutines name from within the
| subroutine itself in the same way that you can have:
|
| ActiveWorkbook.Name
|
| Thanks,
| Al


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default Address Subroutine Name from within Sub

If you called the sub using the CallByName function, you could pass
the name of the sub as an arguement. I too have no idea why you'd want
to do this, but then I've never found a legitimate use of CallByName.

--

"jaf" wrote in message ...
Why would you ever need to?

sub test()
test 'recursive call
if a<"" then test 'ditto
end sub


--
John
johnf 202 at hotmail dot com


"Al" wrote in message
om...
| Hi folks,
|
| Is there any way to refer to a subroutines name from within the
| subroutine itself in the same way that you can have:
|
| ActiveWorkbook.Name
|
| Thanks,
| Al

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
Call a subroutine using variable subroutine name dhstein Excel Discussion (Misc queries) 3 July 26th 09 08:28 PM
SUBROUTINE HELP biker man Excel Discussion (Misc queries) 1 July 28th 07 04:06 PM
Second subroutine to run automatically MatthewT[_7_] Excel Programming 1 January 29th 04 06:59 PM
editing a subroutine ChuckM[_2_] Excel Programming 2 January 12th 04 05:56 PM
Every second subroutine dolegow Excel Programming 1 October 12th 03 02:11 AM


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