Combobox value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gragra72
    New Member
    • Aug 2006
    • 1

    Combobox value

    Hi
    I can't see .value propery in my combo box object, why?
    when I developed in VBA I see something like that:
    Me.CboSer.Value
    in VB6
    .Value doesn't appear
    what do I use?

    thanks
  • sashi
    Recognized Expert Top Contributor
    • Jun 2006
    • 1749

    #2
    Hi there,

    kindly refer to the below code segment.. take care my fren..

    Code:
      Dim Str as String 
      Str = Trim(cboState.Text)

    Comment

    • BSOB
      New Member
      • Jul 2006
      • 77

      #3
      tidbit:
      comboboxes (and other text based objects) dont have value properties (which usualy refur to numerals). the information is in "string" format (because it is text), see sahsi's post for retreiving it. if you want to take the string and make it into a value (if you know it is a number) then you can use the "val()" function.

      Dim MyValue as Double
      MyValue = Val(Trim(CboSta te.Text))

      Comment

      Working...