just a quick question/ observation
If x is declared as string how did you manage to compare it as integer
e.g:If x = 0 Then

codeorder commented: .very good observation.:) +12

Public Class Form1
Inherits System.Windows.Forms.Form