Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Text stream use in VBA screens

  Asked By: Jesse    Date: Jan 07    Category: MS Office    Views: 1231
  

I am developing an application that reads large text files (>100,000
rows) and coverts it into meaningful database. Some of the data streams
runs into multiple rows on the text file. If the strings from all the
rows (Say 10 rows) are concatinated and stored in a cell, the data
becomes a single line string. I still want to retain it as 10 rows (or
lines) in the cell, so that I can display them on my VBA screens as 10
lines in a text box.
Can some one suggest what can be done to this 10 lines of input text
replicated and stored as is on a cell(instead of concatinating into a
single string/line). Basically, I would like to see the lines in the
cell as we would write multiple lines of text scrolling to new line by
using alt+enter.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Varick Fischer     Answered On: Jan 07

The line  break constant is VBCRLF. You will need to include this in your
cell's contents at the appropriate places.

You might also need to format the cell  for "Wrap Text" ...

<cell>.WrapText = True

 
Answer #2    Answered By: Haboos Kauser     Answered On: Jan 07

When you concatenate the lines  include Chr(10) between the lines

Like
Line1 & Chr(10) & Line2

 
Didn't find what you were looking for? Find more on Text stream use in VBA screens Or get search suggestion and latest updates.




Tagged: