LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default FindNext

I am trying to find text in my file then delete the entire row then find the next occurance of the same text, but my code is getting stuck on the findnext line. This is my code. Can you help me

Sub testcell3(

Range("A6").Selec

With ActiveSheet.Range("a6:I1000"
Set P = .Find(what:="PAYMENT RECEIVED THANK YOU", after:=ActiveCell, LookIn
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=
xlNext, MatchCase:=False
If Not P Is Nothing The
FirstAddress = P.Addres
D
P.EntireRow.Delete Set P = .FindNext(P
Loop While Not P Is Nothing And P.Address < FirstAddres
End I
End Wit

End su

 
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
Findnext Noemi Excel Discussion (Misc queries) 1 December 12th 05 11:23 AM
findnext issues mark kubicki Excel Programming 3 February 15th 04 03:22 AM
FindNext problem mark kubicki Excel Programming 4 February 14th 04 02:42 AM
FindNext problem when using PasteSpecial Glyn Baker Excel Programming 1 December 6th 03 08:40 PM
problem with .FindNext Bob Cochran Excel Programming 6 October 11th 03 02:02 PM


All times are GMT +1. The time now is 06:53 PM.

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

About Us

"It's about Microsoft Excel"