Group:  Microsoft Word ยป microsoft.public.word.vba.beginners
Thread: VBA equivalent to Enum in C

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

VBA equivalent to Enum in C
"Jay" <nospam> 02.02.2006 11:58:00
Is there anything similar to the enum statement in C?

Eg, I can have four constants defined using this statement (if I remember my C correctly):

enum {NONE=0, TEST=1, ERROR=5, RETRY=7};


Re: VBA equivalent to Enum in C
"Jezebel" <warcrimes[ at ]whitehouse.gov> 02.02.2006 12:35:29
gee, well yes it does. It's called enum, oddly enough.

Public Enum MyENumValues
None = 0
Test = 1
Error = 5
Retry = 7
End Enum


The value assignments are optional. If omitted, sequential values are
assigned automatically.





"Jay" <nospam> wrote in message
news:ebBvr$%23JGHA.360[ at ]TK2MSFTNGP12.phx.gbl...
[Quoted Text]
> Is there anything similar to the enum statement in C?
>
> Eg, I can have four constants defined using this statement (if I remember
> my C correctly):
>
> enum {NONE=0, TEST=1, ERROR=5, RETRY=7};
>
>


Re: VBA equivalent to Enum in C
"Jay" <nospam> 06.02.2006 13:43:35
Thanks Jezebel. Sorry for my late reply - very helpful.


Is there an equivalent to
"Jezebel" <warcrimes[ at ]whitehouse.gov> wrote in message news:uuydoU$JGHA.3260[ at ]TK2MSFTNGP11.phx.gbl...
gee, well yes it does. It's called enum, oddly enough.

Public Enum MyENumValues
None = 0
Test = 1
Error = 5
Retry = 7
End Enum


The value assignments are optional. If omitted, sequential values are
assigned automatically.



Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net