Thread
:
Add to a string to make it continuous
View Single Post
#
3
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
Add to a string to make it continuous
try
Sub stringem()
For Each C In Range("e2:e" & Cells(Rows.Count, "e").End(xlUp).Row)
mystring = mystring & C & ","
Next
MsgBox Left(mystring, Len(mystring) - 1)
End Sub
--
Don Guillett
SalesAid Software
"Adam" wrote in message
...
I currently have a spreadsheet that has an infinate number of rows
determined
by the user.
The code states:
For row=7 to Worksheets('Example').UsedRange.Row.Count
String1 = Worksheets("Example").Cells.(Row,1).Value
Endfor
Now I am trying to accomplish it to just add to the string opposed to just
creating a new line each time. This information is finally outputted to
Word.
For example: What I want
Column
Apples
Oranges
Peaches
to look like: Apples, Oranges, Peaches
What I get:
Apples, Oranges, Peaches
Apples, Oranges
Apples
is the current output. Any suggestions? Thanks
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]