Re: Where to find Constants and Enumerators?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: mayayana (mayaXXyana1a_at_mindYYspring.com)
Date: 01/18/05


Date: Tue, 18 Jan 2005 16:01:53 GMT


> > > There are 23 msgbox constants - do you remember them all? And what
would
> a
> > > value of "560" mean? It is easier to see that this value (vbOKonly or
> > > vbExclamation or vbDefaultButton3) is logically incorrect - how could
> the
> > > third button on a one-button dialog be the default?
> > >
> >
> > In terms of message boxes, it's very rare that I use
> > anything other than 0, 64, 36, or 33. To my mind the
> > noise that 16 makes should be reserved for messages
> > like, "Hey! The house is on fire! Get out quick!!", and
> > I don't remember ever having used a default focus to
> > the third button.
> >
> > To each their own, I guess.
>
> LOL! If you want to code in numbers instead of mnemonics, I guess that is
> your decision. Hey, didn't I meet you long ago in that machine language
> newsgroup where the only coding allowed was hex? ;-)
>

:) That might have been me. I am, after all,
 quite a daredevil, often doing far-out things like,
for instance, using literals in InStr:

  x = InStr(1, s, ".", 1)

    But since you pointed out the myriad pitfalls
of that method, I've resolved to be less reckless
in the future, if only to set a better example
for beginning scripters who might hurt themselves
by emulating me. So from now on I'm
doing it this way:

Const MY_CONSTANT_THAT_EQUALS_ONE = 1

  x = InStr(1, s, ".", MY_CONSTANT_THAT_EQUALS_ONE)


Quantcast