Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro/VB coding question | Excel Discussion (Misc queries) | |||
Best Practice - Design Question | Excel Discussion (Misc queries) | |||
Question re best practice | Excel Worksheet Functions | |||
Automating Autofill Coding Question | Excel Programming | |||
coding question | Excel Programming |