textbox help please

  • Thread starter Thread starter Gary Keramidas
  • Start date Start date
G

Gary Keramidas

in a multiline textbox, is there an easier way to write the data to the
worksheet than this? right now i use 2 spaces as a delimiter for the end of
line.

arr = Split(tbMessage, " ")
For i = LBound(arr) To UBound(arr)
Range("C" & rw).Value = arr(i) & " "
rw = rw + 2
Next


i also read the data into the form first using the following on activate:

Me.tbMessage = Range("c27").Value & Range("c29").Value & _
Range("c31").Value & Range("c33").Value & Range("c35").Value
 
What problem are you seeing with what you do? If you want to use just one
textbox, but output to many cells, you have to have some way to break it up.
--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)
 
Hi Gary,

To avoid the For ... Next loops, try:

arr = Split(Replace(tbMessage, " ", " "), " ")

Range("C" & rw).Resize(UBound(arr) + 1).Value = _
Application.Transpose(arr)
 
ok, thanks, bob. just wondering if there was a way to tell where the textbox
actually wraps.
 
thanks for your help norman

--


Gary


Norman Jones said:
Hi Gary,

To avoid the For ... Next loops, try:

arr = Split(Replace(tbMessage, " ", " "), " ")

Range("C" & rw).Resize(UBound(arr) + 1).Value = _

Application.Transpose(arr)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top