Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-11-2011, 11:05 AM
Cbrehm Cbrehm is offline While loop not working right Windows 7 64bit While loop not working right Office 2003
Novice
While loop not working right
 
Join Date: May 2011
Posts: 8
Cbrehm is on a distinguished road
Default While loop not working right

I must be crazy because no matter what it stays at good=true


Sub called from userform addcort

Code:
Private Sub addcozip_AfterUpdate()
    'get zip and call sub to add city and state to textboxes
    'this error checking really need to be in the sub addzip
  
  Dim good As Boolean
    'CHECK TO SEE IS ZIP EXISTS 71889 DOES NOT FOR TESTING
  good = IsError(Application.Match(addcozip.Value, Range("zipcode").Columns(1), 0))
    
While good = True
  If good = True Then
        'if zip does not exist get user inout for a good zip
     addcozip.Value = InputBox("The zip code you entered does not exist. Please enter a valid zip code")
        
     
  Else
       
  End If
        'CHECK TO SEE IS ZIP EXISTS
    good = IsError(Application.Match(addcozip.Value, Range("zipcode").Columns(1), 0))


Wend

    'call sub to get city and state, addzip is in module GBLSUBS
addzip addcozip, ADDcoCT, addcostate


End Sub
Attached Files
File Type: xls Tax sale program.xls (263.0 KB, 1 views)
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
'Infinite Loop' error with Infopath 2010 Debbie25 Misc 2 05-18-2011 08:38 AM
While loop not working right Continuous Loop cksm4 Word 6 01-06-2011 09:03 PM
PP 2010 .avi file plays during slide show, but causes the slide show to loop to begin VictorS PowerPoint 0 10-16-2010 10:23 AM
While loop not working right Excel recovery loop problem fatman57 Excel 1 09-08-2010 03:57 AM
Outlook 2003 restart in a loop Stegel Outlook 0 06-29-2007 12:34 PM

Other Forums: Access Forums - Senior Forums

All times are GMT -7. The time now is 04:37 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft