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: 422
Default Code bombing on Loop While line

The below code I copied from the Help screen under the Find Method of the Range
Object:
It is properly changing 2 values to 5 values, but before concluding it is
"bombing" on the 3rd from the last line (below);
Can someone spot what the problem is?
TIA,

With Worksheets(1).Range("A1:A10")
Set c = .Find(2, LookIn:=xlValues)
If Not c Is Nothing Then
firstaddress = c.Address
Do
c.Value = 5
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstaddress
End If
End With


 
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
Macro code to put series name next to individual line in line grap Otani Charts and Charting in Excel 3 February 23rd 10 07:24 PM
Loop Code sheeba Excel Programming 0 December 4th 05 06:12 AM
Macro bombing out CyberFox Excel Programming 13 November 10th 05 09:58 AM
Macro Bombing out - Leith Ross CyberFox[_2_] Excel Programming 0 November 9th 05 08:42 AM
Help with loop code... gaba Excel Programming 1 October 20th 04 01:37 PM


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