OpenText Method with "StartRow" as a variable

  • Thread starter Thread starter JingleRock
  • Start date Start date
J

JingleRock

I need to parse a text file and paste the result in the active
workbook. I need "StartRow" to be the same row (a variable row
number) that contains the word "SALES" in the text file. Is this
possible?
TIA
 
Suggest you use the Find method to determine the row.
It returns a range object so the row would be something like...
rngFound.Row
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)


"JingleRock" <[email protected]>
wrote in message
I need to parse a text file and paste the result in the active
workbook. I need "StartRow" to be the same row (a variable row
number) that contains the word "SALES" in the text file. Is this
possible?
TIA
 
Jim,

Thanks very much for your advice.
I decided to junk the OpenText Method because I have a need to use 4
different "parsing rules" on my text file (I used 2 worksheets to
receive the parsed results). I ended up looping thru my text file and
using stmts such as:
Cells(Counter, 1).Value = "" & Mid(TextLine, 1, 8) to do my parsing.
But I did have a use for the Find Method when selecting certain
cells, and pasting them 2 columns to the right of the search column)
in the same row as the "Found" string. And its fast.

Thanks again,
Chuck
 

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

Back
Top