long text in variable

J

joe

I am using some code like the one below to work with a text file, modifying
its lines one by one:

Set objFS = Server.CreateObject("Scripting.FileSystemObject")

Set objF = objFS.OpenTextFile("MyText.txt", 1)

Do While objF.Line <= 26 ' --- I am reading only certain lines

'--- get entire line
strTemp = objF.ReadLine
'--- do some other stuff here

Loop

Now, I'd like to do the same with similar data that's been stored in a
variable instead of a file.
I guess I could split the variable into an array by using line break as the
splitting character, and
loop the array elements. Any other suggestion? Thanks in advance.
 
R

Ray Costanzo [MVP]

Hi joe,

Your splitting on vbCrLf sounds like a good solution to me.

Ray at work
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top