[Excel] Find & FindNext Method Problem
Hi All,
I am working with excel, and using this find/findnext method.
Here is my code :
Code:
Excel.Range rgn;
Excel.Range usedRange = workSheet.UsedRange;
rgn = usedRange.Find("mystring", missing, missing, missing, missing, XlSearchDirection.xlNext, missing, missing, missing);
And it seem okie. After that i used findNext method :
rgn = usedRange.FindNext(rgn);
but rgn is the same with last one. although there have many "mystring" in workSheet.
I also had tried with this code :
rgn = UsedRange.Find("myString", workSheet.Cells[startRow,startColumn], missing, missing, missing, XlSearchDirection.xlNext, missing, missing, missing);
Thanks.
Re: [Excel] Find & FindNext Method Problem
zkidkid, please use [CODE] tags when posting code in future.
As to your problem, have a look here :
http://blogs.officezealot.com/hansen.../29/20211.aspx
Re: [Excel] Find & FindNext Method Problem
Hi,
Thanks, I have worked around with google and find this above post.
My way is the same with him, but it doesn't work.
I am using Excel 2003.