Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Keeping macros neat

Hello Board

I have read that good programmers create many subroutines when programming
so that many macros can use repetitive routines. it also makes it easier to
track down problems. I concur.

Nonetheless it is distracting to have all of those subroutines show up in my
macro window. They are not independently executable and it requires that I
scroll through many unwanted macros to get to the ones that i want.

How do I prevent the macros which are only "useful subroutines" from
appearing in my macro window?

Thank you

W


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default Keeping macros neat

.... also

If they have arguments, they will not show up in the list, as you cannot
pass an argument value in the list. And if they do repetitive tasks, it is
often the same task, but on different data, so there is a need to pass a
reference to the data to be acted upon.

--
HTH

-------

Bob Phillips
... looking out across Poole Harbour to the Purbecks


"Don Guillett" wrote in message
...
you could label them as private

--
Don Guillett
SalesAid Software
Granite Shoals, TX

"verizon" wrote in message
...
Hello Board

I have read that good programmers create many subroutines when

programming
so that many macros can use repetitive routines. it also makes it

easier
to
track down problems. I concur.

Nonetheless it is distracting to have all of those subroutines show up

in
my
macro window. They are not independently executable and it requires

that
I
scroll through many unwanted macros to get to the ones that i want.

How do I prevent the macros which are only "useful subroutines" from
appearing in my macro window?

Thank you

W






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Keeping macros neat

Just for interest, while of not much utility, you can run a sub like
Sub Tester3(sStr As String)
Debug.Print "tester3: " & sStr
End Sub

from the textbox of the Tools=Macro=Macros dialog by entering

'tester3 "Hello"'

and hitting enter or clicking the run button - but it isn't displayed in the
list.

Based on some other information on xl2002, this may not be possible there -
I haven't tested it in xl2002.

Regards,
Tom Ogilvy


Bob Phillips wrote in message
...
... also

If they have arguments, they will not show up in the list, as you cannot
pass an argument value in the list. And if they do repetitive tasks, it is
often the same task, but on different data, so there is a need to pass a
reference to the data to be acted upon.

--
HTH

-------

Bob Phillips
... looking out across Poole Harbour to the Purbecks


"Don Guillett" wrote in message
...
you could label them as private

--
Don Guillett
SalesAid Software
Granite Shoals, TX

"verizon" wrote in message
...
Hello Board

I have read that good programmers create many subroutines when

programming
so that many macros can use repetitive routines. it also makes it

easier
to
track down problems. I concur.

Nonetheless it is distracting to have all of those subroutines show up

in
my
macro window. They are not independently executable and it requires

that
I
scroll through many unwanted macros to get to the ones that i want.

How do I prevent the macros which are only "useful subroutines" from
appearing in my macro window?

Thank you

W








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default Keeping macros neat

On Sat, 12 Jul 2003 12:27:39 -0400, "Tom Ogilvy"
wrote:

Just for interest, while of not much utility, you can run a sub like
Sub Tester3(sStr As String)
Debug.Print "tester3: " & sStr
End Sub

from the textbox of the Tools=Macro=Macros dialog by entering

'tester3 "Hello"'

and hitting enter or clicking the run button - but it isn't displayed in the
list.

Based on some other information on xl2002, this may not be possible there -
I haven't tested it in xl2002.


This still works in xl2002.

Personally I tend to keep "helper" procedures off the list by making
them functions rather than subs (which also allows me to pass back a
Boolean argument indicating a successful outcome or otherwise)...
although the down side of that is that they can then show up as user
defined Worksheet functions in the formula wizard. Don's original
suggestion of making them Private is the safest way out, IMHO.

Bob Phillips wrote in message
...
... also

If they have arguments, they will not show up in the list, as you cannot
pass an argument value in the list. And if they do repetitive tasks, it is
often the same task, but on different data, so there is a need to pass a
reference to the data to be acted upon.



---------------------------------------------------------
Hank Scorpio
scorpionet who hates spam is at iprimus.com.au (You know what to do.)
* Please keep all replies in this Newsgroup. Thanks! *


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Keeping macros neat

I may be doing something wrong, but I couldn't get it to work in xl2002
(10.4524.4219) SP-2.



Hank Scorpio wrote:

On Sat, 12 Jul 2003 12:27:39 -0400, "Tom Ogilvy"
wrote:

Just for interest, while of not much utility, you can run a sub like
Sub Tester3(sStr As String)
Debug.Print "tester3: " & sStr
End Sub

from the textbox of the Tools=Macro=Macros dialog by entering

'tester3 "Hello"'

and hitting enter or clicking the run button - but it isn't displayed in the
list.

Based on some other information on xl2002, this may not be possible there -
I haven't tested it in xl2002.


This still works in xl2002.

<<snipped

--

Dave Peterson

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Keeping macros neat

That was it. (I live with Medium at home and Low at work.)

hmmmm. Why would xl stop it if I already said ok to macros (with medium)?
Rhetorical question only!


Hank Scorpio wrote:

On Mon, 14 Jul 2003 19:03:57 -0500, Dave Peterson
wrote:

I may be doing something wrong, but I couldn't get it to work in xl2002
(10.4524.4219) SP-2.


Hmmm..., it looks like it's a security level thing. I just retested
it. (Same version as you.) With my security set to its usual level of
Low (this is my home machine and furrign' workbooks Are Not Allowed
Here 'Lessen' I say so, at which time I bump up the security), it runs
fine. If the level is set to either Medium or High, it won't.

Hank Scorpio wrote:

On Sat, 12 Jul 2003 12:27:39 -0400, "Tom Ogilvy"
wrote:

Just for interest, while of not much utility, you can run a sub like
Sub Tester3(sStr As String)
Debug.Print "tester3: " & sStr
End Sub

from the textbox of the Tools=Macro=Macros dialog by entering

'tester3 "Hello"'

and hitting enter or clicking the run button - but it isn't displayed in the
list.

Based on some other information on xl2002, this may not be possible there -
I haven't tested it in xl2002.

This still works in xl2002.

<<snipped


---------------------------------------------------------
Hank Scorpio
scorpionet who hates spam is at iprimus.com.au (You know what to do.)
* Please keep all replies in this Newsgroup. Thanks! *


--

Dave Peterson

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
neat trick - excel art - very nice with out functions yshridhar Excel Worksheet Functions 1 April 22nd 08 07:09 PM
Neat Trick Frank Pytel Excel Discussion (Misc queries) 4 April 21st 08 09:20 PM
ANSWER: NEAT TOOL FOR HYPERLINK "DN" DOCUMENT. nastech Excel Discussion (Misc queries) 4 September 30th 07 11:29 PM
Sharing a neat trick MartinW Excel Discussion (Misc queries) 6 July 9th 07 12:52 AM
Keeping track of useful macros malvis Excel Discussion (Misc queries) 1 August 2nd 05 11:28 PM


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