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