Not (IsNumeric(txtValue.Text)) Then
                MsgBox "The value '" &amp; txtValue.Text &amp; "' could not be
                 interpreted as a number.", vbInformation
                txtValue.SetFocus
                Exit Sub
            ElseIf Len(Trim$(txtValue.Text)) &lt; 1 Then
                MsgBox "Please enter a value.", vbInformation
                txtValue.SetFocus
                Exit Sub
            End If
        ElseIf (optValueType(2).Value) Then
            ' Process the string...
   