Actually I went ahead and worked out the rest for ya real quick:
VB Code:
Enum Animals Dog Cat Bird Elephant End Enum Dim vals As Array Dim nams As Array vals = Animals.GetValues(GetType(Animals)) nams = Animals.GetNames(GetType(Animals)) Dim cnt As Short Dim cntMax As Short cntMax = vals.Length - 1 For cnt = 0 To cntMax cboAnimals.Items.Add(nams.GetValue(cnt) & "=" & vals.GetValue(cnt)) Next vals = Nothing nams = Nothing
The code assumes a combo or list box named cboAnimals and should be put in the form_load or some other sub.




Reply With Quote