[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 242
  • Last Modified:

save combo box selection to variable?

I have a unbound combo box.  How can I save the users selection to a variable?
0
gbnorton
Asked:
gbnorton
1 Solution
 
Rey Obrero (Capricorn1)Commented:
use the afterupdate event of the combo

private sub comboName_afterupdate()
dim var1,var2, var3

var1=me.comboName.column(0)
var2=me.comboName.column(1)
var3=me.comboName.column(2)


end sub

0
 
answer_dudeCommented:
In the On Change event put the following code:

    Dim sVal As String
    sVal = ComboBoxName.Value
    Debug.Print sVal
   
0
 
gbnortonAuthor Commented:
Perfect.  As usual.  Thanks.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now