Another thing that would be better would be label1.caption=x instead of label1=x. When I first saw that code, I didn't even think it would run, but I tried it with VB an it worked. (I guess the caption property is the default of label controls)
If you're confused with VB, I highly suggest getting "Sams Teach yourself Visual Basic 6 in 21 Days"(If you're using VB6) Or just look online for some VB tutorials. Once you get the hang of VB, you'll love it.
Edit: May I introduce you to static variables? A static variable is exactly what you need for something like this. When you declare a variable with the "dim" statement it is set to 0 or null as the case may be. So every time you click the Command button, x will be set to 0 again. However, by using a static variable, the variable retains the same value. Here's an examle. You click the command button and the caption on the label increases by one.
Option Explicit
Private Sub Command1_Click()
Static x As Integer
If x = 0 Then x = 1
x = x + 1
Label1.Caption = x
End Sub
Private Sub Form_Load()
Label1.Caption = "1"
End Sub