Hi All

I am trying to write a code in command button if i click it should give values 1 to 10 in a1 to a10
but my code gives only 10 for all cells. can you please tell whats wrong in this code

many thanx



Private Sub CommandButton1_Click()
Dim x As Integer
Dim y As Range
Dim z As Range

For Each y In Range("a1:a10")
For x = 1 To 10
y.Cells.Offset(0, 0).Value = x
Next x
Next y


end Sub