Попробуйте диверсифицировать свой код
1) определить, является ли строка целым числом
2), а затем определить, является ли она больше 0
Sub Validation0()
If IsNumeric(curBat) Then
' Here, it still could be an integer or a floating point number
dim curBat2 as integer = Convert.ToInt32(curBat)
If curBat2 > 0 Then
Else
MessageBox.Show("Please enter a number greater than 0.", "Error",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation,
MessageBoxDefaultButton.Button1)
End If
End If
End Sub
Если вы хотитеокруглите целочисленное значение, затем используйте
Math.Roundoff(curBat2)