Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Aysel Kaya   on Dec 10 In MS Office Category.

  
Question Answered By: Faizah Khan   on Dec 10

I think you have some good reasons to declare variables in that way... For
you.

A big advantage for me to declare at the top is to have them together so
that I *can* sort them and zap the unused. I also think it's neater... But
what the heck.

If you want to see a list of unused try out MZTools. A great set of VBA
tools with lots of options.... Well worth looking at and V3.0 is free.

I'd actually tend to declare DaysPerLeapYear as a constant... It aint gonna
alter for a loooong time, and prefix it with a type and sort of scope.

I try to use a 1, 2 or 3 character... Smallest I can without being
ambiguous... Type prefix along with a character specifying where it comes
from like "l" for local, "p" for parameter and "g" for global.

So "ilN" becomes a local integer counter and so on.

Share: 

 

This Question has 11 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Code Cleaning Was: Re: Can't open excel file Or get search suggestion and latest updates.


Tagged: