d2jsp
Log InRegister
d2jsp Forums > Off-Topic > General Chat > General Archive > Anybody Know Visual Basic? > Halp
Add Reply New Topic
Member
Posts: 432
Joined: Jul 29 2016
Gold: 0.00
Aug 11 2016 03:29pm
I don't want to use Me.States.Value to get the value of the list box. Is there another way I can do this?

Private Sub UserForm_Initialize()

With States
.AddItem "Illinois"
.AddItem "Indiana"
.AddItem "Iowa"
.AddItem "Michigan"
.AddItem "Minnesota"
.AddItem "Ohio"
.AddItem "Pennsylvania"
.AddItem "Wisconsin"
.Value = "Indiana"
End With

End Sub

Private Sub ok_Click()
MsgBox ("You live in " & Me.States.Value)
End Sub

This post was edited by dankmemes1337 on Aug 11 2016 03:29pm
Member
Posts: 9,246
Joined: Jul 27 2016
Gold: 17,071.70
Aug 11 2016 03:32pm
no
Member
Posts: 2,268
Joined: Oct 13 2013
Gold: 48,137.20
Aug 11 2016 03:40pm
http://forums.d2jsp.org/forum.php?f=120

This post was edited by bl4ckw1dow on Aug 11 2016 03:40pm
Member
Posts: 432
Joined: Jul 29 2016
Gold: 0.00
Aug 11 2016 04:17pm
Quote (bl4ckw1dow @ Aug 11 2016 05:40pm)


thx
Member
Posts: 12,355
Joined: Aug 19 2008
Gold: 742.00
Aug 11 2016 05:26pm
why would you not want to use the property built for that purpose
Member
Posts: 432
Joined: Jul 29 2016
Gold: 0.00
Aug 11 2016 11:25pm
Quote (eggson @ Aug 11 2016 07:26pm)
why would you not want to use the property built for that purpose


We didn't cover it in class so I dont wanna get caught getting the idea from a yahoo answers post lol
Member
Posts: 17,472
Joined: Apr 4 2012
Gold: 18.31
Aug 12 2016 04:54pm
the know
Member
Posts: 47,612
Joined: May 29 2012
Gold: 5,475.04
Aug 12 2016 04:57pm
I know google
Go Back To General Archive Topic List
Add Reply New Topic