Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default textbox help please

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
--


Gary



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default textbox help please

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)

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
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
--


Gary





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default textbox help please

Hi Gary,

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

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

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


---
Regards,
Norman


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
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
--


Gary





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default textbox help please

ok, thanks, bob. just wondering if there was a way to tell where the textbox
actually wraps.

--


Gary


"Bob Phillips" wrote in message
...
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)

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
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
--


Gary







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default textbox help please

thanks for your help norman

--


Gary


"Norman Jones" wrote in message
...
Hi Gary,

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

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

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

Application.Transpose(arr)


---
Regards,
Norman


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
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
--


Gary







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP! I Lost The Ability To Advance From TextBox To TextBox With the ENTER Or The TAB Keys Minitman[_4_] Excel Programming 0 February 22nd 05 08:50 PM
Textbox Bug? Missing/delayed update of textbox filled via VBA MarcM Excel Programming 0 November 4th 04 05:47 PM
Textbox Bug? Missing/delayed update of textbox filled via VBA MarcM Excel Programming 0 November 4th 04 05:43 PM
How to move cursor from one textbox control to another textbox con Tom Ogilvy Excel Programming 1 September 16th 04 03:42 PM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM


All times are GMT +1. The time now is 07:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"