MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Declaring all variables as modulewide w/o listing them one by one


Posted by Jeff on March 02, 2000 8:40 AM

How can I declare (or set) all variables as modulewide w/o listing them one by one before the modules first procedure?

For example is there something like dim all????

Thanks


Posted by Keith on March 03, 2000 10:39 AM

Even if you could do this (which you can't), it would be extremely poor programming practice.

You should DIM each variable to the type it is to be. This reduces the amount of memory required. It also makes you aware of some coding errors at design time instead of at run time.

HTH
Keith

Posted by Keith on March 03, 2000 10:39 AM

Even if you could do this (which you can't), it would be extremely poor programming practice.

You should DIM each variable to the type it is to be. This reduces the amount of memory required. It also makes you aware of some coding errors at design time instead of at run time.

HTH
Keith