Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
jrh jrh is offline
external usenet poster
 
Posts: 14
Default Calling Procedures

I have a title for a procedure which is the title I want
someone to see when they go to Tools-Macro and pick a
macro to run. This procedure calls a couple of procedures
written below it in the module. I don't want these
procedure names to be choices when someone goes to Tools-
Macro. Do I have to name these other procedures

something different so they are called by that one
procedure but are not choices to run on their own?

thank you.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Calling Procedures

Hi use the declaration
Private sub foo()
' your code
end sub

--
Regards
Frank Kabel
Frankfurt, Germany

jrh wrote:
I have a title for a procedure which is the title I want
someone to see when they go to Tools-Macro and pick a
macro to run. This procedure calls a couple of procedures
written below it in the module. I don't want these
procedure names to be choices when someone goes to Tools-
Macro. Do I have to name these other procedures

something different so they are called by that one
procedure but are not choices to run on their own?

thank you.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Calling Procedures

One way is to declare the procedure as Private. E.g.,

Private Sub TheSubName()
' your code here
End Sub

The disadvantage of this is that the procedure can be called only
by procedures in the same module.

Another way is to make the procedure a Function instead of a Sub
procedure.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"jrh" wrote in message
...
I have a title for a procedure which is the title I want
someone to see when they go to Tools-Macro and pick a
macro to run. This procedure calls a couple of procedures
written below it in the module. I don't want these
procedure names to be choices when someone goes to Tools-
Macro. Do I have to name these other procedures

something different so they are called by that one
procedure but are not choices to run on their own?

thank you.



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
Separating sub procedures JAW Excel Discussion (Misc queries) 4 January 28th 09 12:17 PM
ListBox Procedures Rockee052[_48_] Excel Programming 1 February 20th 04 09:20 AM
Sequential Sub Procedures Roger[_10_] Excel Programming 3 November 20th 03 04:32 PM
Using Sub-procedures w/in a function LizUrish Excel Programming 2 November 6th 03 09:18 AM
what's wrong with this sub procedures? active_x[_4_] Excel Programming 8 September 10th 03 05:25 AM


All times are GMT +1. The time now is 11:11 PM.

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"