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: 623
Default Error 91 on Find second time through a loop

I have the following code in a For loop which goes through every file in a
folder:

On Error Goto NoData
Columns("A:A").Select
Cells.Find(What:="06/30/2003").Activate

I'm having trouble getting the On Error to work. The first file where the find
fails works fine -- it goes to the NoData statement and continues on. With the
second file, I get an error 91: Object variable or With block variable not set.

How do I get the On Error statement to take effect with every file, not just the
first?

--
Regards,
Fred



 
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
Run time error 1004 in loop danpt Excel Discussion (Misc queries) 4 February 11th 10 04:02 PM
run time error 1004 in loop danpt Excel Discussion (Misc queries) 1 February 10th 10 11:45 PM
Loops to find blanks then loop to find populated Bevy Excel Programming 0 June 1st 06 04:50 PM
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error rdavis7408 Excel Programming 1 August 25th 04 03:54 AM
Run-time error '91' on Cells.Find() Vera Excel Programming 0 January 20th 04 08:12 AM


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