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,069
Default Find Problem

Hi,

Using Code to find a value, and if found, then delete the line.
Simple right?


Cells.Find(what:="2000103", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate

If ActiveCell.Value = 2000103 Then
Selection.EntireRow.Delete

End If


But problem is, when the value 2000103 is not present, I get Run Time Error
91.

Any ideas on debugging?

 
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
Problem with 'Find' Dave Excel Discussion (Misc queries) 5 December 15th 09 01:27 PM
Find and Find Next problem Richard Hocking Excel Programming 2 September 13th 06 03:51 PM
Please help me find the problem with this Barb Reinhardt Excel Programming 1 August 29th 06 03:31 PM
Find problem alanthecat Excel Programming 7 July 5th 05 01:17 PM
find problem John Excel Programming 4 July 3rd 04 08:30 AM


All times are GMT +1. The time now is 07:08 AM.

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"