lo que quiero hacer es lo siguiente:
tengo un texbox de esta forma
PERAS-MANZANAS-FRUTILLA-HIGO
y tengo otro vacio con la propiedad multiline ON
¿como hago para que cuando presione un boton quede asi?
PERAS
MANZANAS
FRUTILLA
HIGO
es decir, que pase al otro TEXT sin los "-" y se pongan uno abajo del otro
espero que me entiendan..
dim a as string
dim b() as string
dim i as integer
text1.text = "PERAS-MANZANAS-FRUTILLA-HIGO"
a = text1.text
b = split(a,"-")
for i = 0 to ubound(b)
text2.text = text2.text & b(i) & vbnewline
next i
o
dim a as string
text1.text = "PERAS-MANZANAS-FRUTILLA-HIGO"
a = text1.text
a = replace(a,"-",vbnewline)
text2.text = a
Creo que este valdría:
dim pera as string
dim manzana as string
dim frutilla as string
dim higo as string
pera = mid(text1,1,5)
manzana = mid(text1,7,14)
frutilla = mid(text1,16,23)
higo = mid(text1,2528)
text2 = pera & vbcrlf & manzana & vbcrlf & frutilla & vbcrlf & higo & vbcrlf
Aunque si no fuera siempre lo mismo sería de otra manera.
Me sirvio lo de Crack pero muchisimas gracias a los 2 por estar siempre atento...
chau....