PDA

View Full Version : Solved: Display the first word separated by comma in textbox



av8tordude
07-16-2011, 11:31 AM
I have a city, state display in a cell. How do i display the city only in the textbox.

example:

display Miami, Florida in a textbox as Miami.

Kenneth Hobs
07-16-2011, 12:00 PM
Textbox1.Value = Split(Range("A1").Value2, ",")(0)

av8tordude
07-16-2011, 12:06 PM
Just out of curiosity, the character in red, is that a typo or is that correct?

Textbox1.Value = Split(Range("A1").Value2, ",")(0)

Kenneth Hobs
07-16-2011, 12:13 PM
Value2 is a valid property of the Range object.

av8tordude
07-16-2011, 12:17 PM
Ok...Thank Ken