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: 7
Default Do Loop doesn't stop

Hi, I have a problem with a Do Until loop, it doesn't stop unless I
Ctrl Break out of it, here's the loop:

Dim productRow As String
Dim foundRowNum As Integer
Dim i As Integer

productRow = InputBox("Enter the product code")
i = 4
Do Until i = 131
If Range("A" & i).Value = productRow Then
foundRowNum = i
MsgBox "The row for product " & productRow & " is " &
foundRowNum & ".", _
vbInformation
Exit Do
End If
Loop

Am I missing something here or is it ok? I want the user to be able
to input the product number and the msgbox to display the product
number and it's corresponding row...is my syntax off somewhere, are my
dimensions wrong? I'm clueless...please advise...thanks...

-Lee

 
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
Stop Loop Robert[_30_] Excel Programming 2 January 17th 07 01:34 PM
Do Loop Won't Stop Looping Lost in Alabama Excel Programming 13 February 23rd 06 12:26 AM
Hot key to stop a LOOP joopdog[_3_] Excel Programming 5 February 9th 06 06:51 PM
how to stop a loop L775 Excel Programming 6 November 29th 04 08:37 PM
HELP!!!! Can't stop a loop (NOT an infinite loop) TBA[_2_] Excel Programming 3 December 14th 03 03:33 PM


All times are GMT +1. The time now is 06:40 AM.

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"