CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    Oct 2008
    Posts
    116

    Unhappy [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.
    Last edited by HanneSThEGreaT; June 21st, 2010 at 01:12 AM.
    My English is very bad. So tell me if Something I talked make u confuse.
    My Ebook Store: www.coding.vn/book.php

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured