how to cut off textbox information

  • Thread starter Thread starter cmdolcet69
  • Start date Start date
C

cmdolcet69

How can you cut off extra information from a .text combo box. In muy
combo boxes i have teh following information combobox 1: 2-5/3"
combobox 2: 3-1"
combobox 3: 4-50.00mm

How can i populate my text box with only the 234

which is the start of each combobox text in the list.
 
How can you cut off extra information from a .text combo box.  In muy
combo boxes i have teh following information combobox 1: 2-5/3"
                 combobox 2: 3-1"
                 combobox 3: 4-50.00mm

How can i populate my text box with only the 234

which is the start of each combobox text in the list.

How do you add the information to the combobox? That's where you need
to trim the data.

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/
 
cmdolcet69 said:
How can you cut off extra information from a .text combo box. In muy
combo boxes i have teh following information combobox 1: 2-5/3"
combobox 2: 3-1"
combobox 3: 4-50.00mm

How can i populate my text box with only the 234

which is the start of each combobox text in the list.

If each combobox starts with a one character numeric then you can use:

dim newText = comboboxControl.text.substring(0,1)

If there can be numbers greater than 9 and "-" is always the delimeter
then use:

dim charCount as integer= instr(comboboxControl.text,"-")-1
dim newText = comboboxControl.text.substring(0,charCount)

Untested but you get the idea.

LS
 
Back
Top