Don,
I must first say that I owe you an apology for replying so sarcasticly.
Now I would like to thank you for making me think. I was finally able
to get the code to work. It was a little more difficult than I
explained. When the line firstAddress = Myfound.address was executed,
the findnext never returned to firstAddress.
For those who may look for examples in the future, I was trying to
change "A1" to "A01". The problem was that some cells contained just
"A1", some "Pin A1", and others "Block One A1". The code would work up
until it found a cell containing "A10". I did not want it to change it
to "A010", so the code would continue looping through all cells
containing "A10". I created a new String variable nextAddress to equal
Myfound.address only if m_instr = 0 (which used InStr to search cells
for "A1" & " "), and used a loop until m_instr0 or nextAddress <
Myfound.address
Sometimes it is better to learn from being a little frustrated.
Thanks again,
Bob
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!