View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed[_9_] Ed[_9_] is offline
external usenet poster
 
Posts: 194
Default Collecting values for later display?

Thanks very much, Tom. This helps a lot.

Ed


"Tom Ogilvy" wrote in message
...
Yes, sStr would be dimensioned as String

sStr = sStr & "abc" & "cdf"
would produce abccdf

sStr = sStr & "abc & vbnewline & "cdf"
would produce
abc
cdf

Regards,
Tom Ogilvy


"Ed" wrote in message
...
Thanks, Tom. I appreciate the help.

So I need to add a Dim sStr as String to the beginning, right? And what
does the vbNewLine do?

Ed


"Tom Ogilvy" wrote in message
...

[SNIP]

' delete the cell
sStr = sStr & ActiveCell.Value & vbNewLine
Selection.Delete Shift:=xlUp

' go back and continue

Range("AM" & rngR).Select

ActiveCell.Offset(rowOffset:=-1, columnOffset:=0).Activate

End If

Loop

Msgbox sStr

This is limited to 255 characters. If you have more than that, you

would
need to perhaps put the string somewhere else, like in a cell, or use

a
userform with a listbox and add them to the list.

Regards,
Tom Ogilvy