#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default Call

Hello Group,

I have a program that exceeded the allowable amount of code. Because of this
I had to create a call to anothe Sub. All it does is do some calculation on
the worksheet, but it appears as a Sub in the list of available subs. Since
it is a Call, I would not like it to appear in the list. I would not like
anyone to try and run it independantly. Can I make it disappear from the
available list?

Thanks,
David
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 230
Default Call

David wrote:
Hello Group,

I have a program that exceeded the allowable amount of code. Because of this
I had to create a call to anothe Sub. All it does is do some calculation on
the worksheet, but it appears as a Sub in the list of available subs. Since
it is a Call, I would not like it to appear in the list. I would not like
anyone to try and run it independantly. Can I make it disappear from the
available list?


Ignoring the fact that monolithic slabs of code like that will be a
horrible maintenance trap that will come back to haunt you.
Two easy ways to hide internal subroutines:

Declare them as "private" or give them parameters. The latter offers a
way to parameterise your problem and avoid spurious duplication of code.

Regards,
Martin Brown
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default Call

Thanks Don.

That did it and I just went through another sub and reduced it by over 50%,
so you are right. It is mostly a time and effort thing.

Thanks Again,
David

"Don Guillett" wrote:


You can label it as
private sub mysub()

However, I'll bet your original can be reduced. You are probably using
selections etc. Post it

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"David" wrote in message
...
Hello Group,

I have a program that exceeded the allowable amount of code. Because of
this
I had to create a call to anothe Sub. All it does is do some calculation
on
the worksheet, but it appears as a Sub in the list of available subs.
Since
it is a Call, I would not like it to appear in the list. I would not like
anyone to try and run it independantly. Can I make it disappear from the
available list?

Thanks,
David


.

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
Not sure what to call this srosetti Excel Programming 3 October 28th 09 01:58 AM
Wouldn't know what to call it! 1Fish2Fish Excel Worksheet Functions 5 August 26th 08 07:37 PM
Call Center Management: How to calculate 'cost per call' Denniso6 Excel Discussion (Misc queries) 2 June 25th 06 05:01 PM
Run or Call MBlake[_2_] Excel Programming 7 August 27th 05 09:29 PM
DLL Call No Name Excel Programming 1 October 16th 03 01:34 PM


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