View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 380
Default reduce public variables

Bart,

I must ask, why bother? Whatever you do you are left with a number of
variable/properties that would be used irrespective. I personally wouldn't
create a class just for public variables, as I like classes to be object
based, and this class wouldn't be, and I fail to see any advantage of UDTs
or Enums.

Old maxim, if it ain't broke, why fix it?

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"RB Smissaert" wrote in message
...
When you have a large application with lots of modules and forms and a

large
number of public variables what would be the best way to organize and

reduce
these public variables?
Making all these variables private or local is not an option as it would
mean an enormous duplication of code.
The 2 options I can see are making classes or UDT's and maybe UDT's are

the
simplest option.
So with a UDT I would get a public type with a number of elements that are
the old public variables.
Then there would be a public variable declared as this public type.
Would this make sense or are there any better options?

RBS