Sorry it is hard to read this code (indent when you are in a loop, the indention shows what peice of code goes within which part of the loop) , but it looks like you are mixing the types of loop statements.
When using Do until, you don't need a second loop statement.
Code:
Private Sub Command1_Click()
Dim x As Integer
x = 0
Do
Text1.Text = x
x = x + 1
Loop Until x = 10
End Sub
A do while statement requires the loop
Code:
Private Sub Command1_Click()
Dim x As Integer
x = 0
Do While x < 10
Text1.Text = x
x = x + 1
Loop
End Sub
It does not appear that you are incrementing your number inside the loop, I am also not sure why you are dimensiong variables in a loop.