Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Junior Member
 
Posts: 21
Default OpenText Method with "StartRow" as a variable

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default OpenText Method with "StartRow" as a variable


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"
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
Junior Member
 
Posts: 21
Default OpenText Method with "StartRow" as a variable

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Help - Method "Range" of object "_Worksheet" failed. Alan Smith Excel Programming 3 March 15th 07 06:55 PM
What is Error "Method "Paste" of object "_Worksheet" failed? vat Excel Programming 7 February 17th 06 08:05 PM
use variable in Workbooks("book1").Worksheets("sheet1").Range("a1" Luc[_3_] Excel Programming 2 September 28th 05 08:37 PM
Workbooks.OpenText StartRow:=2 Not Skipping Row 1 John Saunders Excel Programming 2 August 26th 05 11:51 AM
Getting "compile error" "method or data member not found" on reinstall Bp Excel Programming 1 April 23rd 04 04:42 PM


All times are GMT +1. The time now is 11:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"