Should Enum create a selection Box?

T

Trip

I've created a small enumeration the declaration section of a module:

Public Enum REOrderType
Level_1 = 1
Level_2 = 2
Level_3 = 3
Level_4 = 4
Profit_Objective = 5
Stop_Loss = 6
End Enum

I had expected that when I now type REOrderType = .... that I would get
a drop-down box presenting me with the options (otherwise I have to
remember exactly how I spelt all the options).

Am I doing something wrong?? Or, is this just the way it's supposed to
work?

Thanks!

Trip
 
T

Tushar Mehta

An Enum establishes a 'type' of a list. You then have to create a
variable of that type. So, if you have
Public Enum EROrderType
...
End Enum
sub abc()
dim x as REOrderType

Now, when you type in 'x=' (w/o the quotes), you will see the drop down
list.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top