Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Works beautifully but stops half way through

Hi,
I found this script in this group and changed it to my parameters. It
is finding a 10 line by 2 column wide header on the top of every page
of a file I imported and removing it. It works great but for some
reason it stops on line 32785. There are 54733 lines in the file. I
was hoping someone could review the code and see if you can tell why it
is stopping here.
Thanks!
Kim

Sub DeleteHeaders()

Dim intCurRow As Integer
Columns("A:A").Select
On Error GoTo jump1:
Do
Cells.Find(What:="STAT", After:=ActiveCell,
LookIn:=xlFormulas, Lookat _
:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
True, SearchFormat:=False).Activate
intCurRow = ActiveCell.Row
ActiveCell.Range("A1:B10").Select
Selection.EntireRow.Delete
Loop
jump1:

End Sub

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Works beautifully but stops half way through

Thanks Tom,
I deleted that after I found the code but it still seems to be around.
I think the code I used that worked I found in a post you supplied
awhile ago. That's funny.
Thanks!
Kim

Tom Ogilvy wrote:
You also had an answer to your earlier post.

--
Regards,
Tom Ogilvy


" wrote:

That did it!!!!
Thank you

Zone wrote:
You should dim your CurRow variable as Long. Haven't tested that, but
should do it.
James
wrote:
Hi,
I found this script in this group and changed it to my parameters. It
is finding a 10 line by 2 column wide header on the top of every page
of a file I imported and removing it. It works great but for some
reason it stops on line 32785. There are 54733 lines in the file. I
was hoping someone could review the code and see if you can tell why it
is stopping here.
Thanks!
Kim

Sub DeleteHeaders()

Dim intCurRow As Integer
Columns("A:A").Select
On Error GoTo jump1:
Do
Cells.Find(What:="STAT", After:=ActiveCell,
LookIn:=xlFormulas, Lookat _
:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
True, SearchFormat:=False).Activate
intCurRow = ActiveCell.Row
ActiveCell.Range("A1:B10").Select
Selection.EntireRow.Delete
Loop
jump1:

End Sub




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
Compare 1st Half & 2nd Half of 2008. Jerry L Excel Worksheet Functions 3 December 12th 08 09:47 PM
Cell Paste using cell link option Half works MardiT Excel Worksheet Functions 4 July 28th 08 06:51 PM
print half of rows on left and other half on right Steve B. Excel Discussion (Misc queries) 2 November 16th 07 11:20 AM
Cell protection only half works Angus Excel Discussion (Misc queries) 2 November 4th 06 06:10 PM
Half of the code works? hotherps[_140_] Excel Programming 1 September 2nd 04 11:55 PM


All times are GMT +1. The time now is 08:09 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"