Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default Coding best practice question

I insert a module titled PubDec in my workbook and store all my public
statements in it. Sometimes I don't use it but declare it at the top of the
module it is being used in. Is there any advantage/disadvantage to this is
there a 'best practice' methodology for where you should store them?

Thanks, Mark


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Coding best practice question

I don't think there is any 'best practice' Mark.

What I do is created a Global module if it is a big application that has
many such variables, makes them easier to find.

Like you, if I have just a small app, I put them in a code module.

--
HTH

Bob Phillips

"Mark Stephens" wrote in message
...
I insert a module titled PubDec in my workbook and store all my public
statements in it. Sometimes I don't use it but declare it at the top of

the
module it is being used in. Is there any advantage/disadvantage to this is
there a 'best practice' methodology for where you should store them?

Thanks, Mark




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Coding best practice question

I concure with your reasoning. If it is a big enough application then a
public declarations module is a great idea. The only thing I would comment on
is the name of the module. If you fall of the face of the earth the person
coming after you is going to have to figure out all of your abbreviations. I
make it a practice not to abbreviate as much as possible.
modPublicDeclarations would in my opinion be a much better name. There is no
mistaking that is is a module containing all of your public declarations. I
find that doing this even novices can look at my code and have some idea what
is going on. Just my two cents.

HTH

"Mark Stephens" wrote:

I insert a module titled PubDec in my workbook and store all my public
statements in it. Sometimes I don't use it but declare it at the top of the
module it is being used in. Is there any advantage/disadvantage to this is
there a 'best practice' methodology for where you should store them?

Thanks, Mark



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
Macro/VB coding question melExcel2007 Excel Discussion (Misc queries) 3 June 4th 10 11:16 PM
Best Practice - Design Question Alan Excel Discussion (Misc queries) 8 April 12th 07 11:37 AM
Question re best practice anny Excel Worksheet Functions 2 March 25th 06 07:14 PM
Automating Autofill Coding Question TrishaB Excel Programming 10 February 7th 05 02:36 PM
coding question No Name Excel Programming 1 September 28th 04 05:26 PM


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