+ Reply to Thread
Results 1 to 5 of 5

Msgbox until a specific string is found.

  1. #1
    Forum Contributor excelkeechak's Avatar
    Join Date
    07-21-2008
    Location
    India.
    MS-Off Ver
    2013 /2016
    Posts
    363

    Msgbox until a specific string is found.

    Hi,i had written a sample code in which a message box pops up until the cell reaches a specific string. i had attached the excel sheet. my loop is not running perfectly. Its going into infinite loop.

    I want a message box appear till the value of the cell in the column (Range:d1:d20) is "Admin Incharge" using Do and For Loop.Kindly correct where my code went wrong.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Msgbox until a specific string is found.

    I won't ask why you're doing that...
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    04-24-2007
    Location
    NYC
    MS-Off Ver
    2k3/2k7/2010
    Posts
    270

    Re: Msgbox until a specific string is found.

    Please Login or Register  to view this content.
    What happens here is ur looping without proceeding to the next range.

    Please Login or Register  to view this content.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Msgbox until a specific string is found.

    Loops can slow down code, looping a msgbox will take even longer. Why not use .Find to find the string?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Forum Contributor excelkeechak's Avatar
    Join Date
    07-21-2008
    Location
    India.
    MS-Off Ver
    2013 /2016
    Posts
    363

    Re: Msgbox until a specific string is found.

    Thanks,Stephen and mr.Roy for Your Replies. Mr.Stephen Its my own idea and example just to learn Do Loops. I m just giving a try to it. I wanted to learn Do Loops so its just a small example of applying it.

    As suggested, by mr.Roy. Yes its taking time to display the msgbox.I will try to implement .Findmethod in my Example.thanks Mr. Roy again for ur suggestion.also do tell me any examples of Trying n using Do Loops .

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1