[Webinar] Streamline your web hosting managementRegister Today

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

Dissecting a Field

Hi,

Can someone guide me as to what I am doing wrong.  Here is the scenario.  I have a combobox (in outlook) that is capturing data from 3 columns in excel.  They are separated with a Tab.  What I would like to do is upon selection of the name in the dropdown field the text is parsed out to their respective textboxes......

Example:  John Michael         39 yrs         1/18/08              

This is what I have:
TextBox3.text=Trim(Left(cboBro.Text,Instr(cboBro.Text, vbTab)))
TextBox53.text=Trim(Replace(cboBro.Text,textbox3.text,""))
TextBox54.text= ??????

Textbox 3 works fine however Textbox 53 gives me the age and date when all I want is the age and can't figure out how to get only the date on Textbox54.

Any help or guidance will be so great.

thank you.




0
JadeCaridad
Asked:
JadeCaridad
1 Solution
 
GrahamSkanRetiredCommented:
If it is a single-column combo, then use Split()

Dim strParts as string

strParts() = Split(cboBro.Text, vbTab)
TextBox3.text=Trim$(strParts(0))
TextBox53.text=Trim$(strParts(1))
TextBox54.text= Trim$(strParts(2))
0
 
JadeCaridadAuthor Commented:
Graham.....
Dude you are awesome!!!!!
thank you !!!!!!
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

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