Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Custom class Property Offer Selection 1

Status
Not open for further replies.

Chance1234

IS-IT--Management
Jul 25, 2001
7,871
US
Been a long time since i ve written a class module , what i am trying to do is roughly the following

Private Card


Property get WhatCard()
Whatcard = card
End property

Property let whatcard(ByVal, Newvalue)
Card = newvalue
end property

What i want to happen in the code is , someone can go

whatcard = and a dropdown appears with hearts, diamonds, clubs, spades





Chance,

Filmmaker, gentlemen and read my blog at
 
If the dropdown values are the only thing you want, are you sure you need a class?

Why not just

[tt]public enum WhatCard
hearts = 0
diamonds = 1
clubs = 2
spades = 3
end enum[/tt]

in a standard module, then see what happens when you type

[tt]dim mycard as WhatCard
mycard =[/tt]

Roy-Vidar
 
Oh sorry, you meant the property (using the above enum)

[tt]property get ThisCard() as WhatCard
...
Property let ThisCard(ByVal Newvalue as WhatCard)[/tt]

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top