Good evening,

Having a little trouble with some code. I guess it won't work as I have it but I was wondering if anyone could recommend an easy way to do it. I don't want to write the code to verify each textbox separately. I was hoping to have it do a loop. Here is the code... It is the "Else if..." statement that generates the error. Thanks in advance for any help! dw

Sub test()
For i = 1 To 12
If Updateform.Controls("Textbox" & i).Value = "" Then
MsgBox ("You have to enter a value in each box.")
Exit Sub
ElseIf Not IsNumber(Updateform.Controls("Textbox" & i).Value ) Then
MsgBox ("Values entered have to be numeric.")
Exit Sub
End If
Next i
End Sub