Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Stop Loop | Excel Programming | |||
Do Loop Won't Stop Looping | Excel Programming | |||
Hot key to stop a LOOP | Excel Programming | |||
how to stop a loop | Excel Programming | |||
HELP!!!! Can't stop a loop (NOT an infinite loop) | Excel Programming |