Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2006

Tip: Looking for answers? Try searching our database.

VBA equivalent to Enum in C

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jay - 02 Feb 2006 11:58 GMT
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};
Jezebel - 02 Feb 2006 12:35 GMT
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.

> 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};
Jay - 06 Feb 2006 13:43 GMT
Thanks Jezebel. Sorry for my late reply - very helpful.

Is there an equivalent to
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.