you can do this (this example from a form you can get the range from users then the code generates the numbers and writes to dbf )
Store thisform.text1.value to lncount
Store thisform.text2.value to lncount1
Rand(-1)
For ix = lncount to lncount1
lncount= Replicate("0", 6 - Len(TransForm(lncount))) + TransForm(lncount)
lncount1= Replicate("0", 6 - Len(TransForm(lncount1))) + TransForm(lncount1)
Select label
Insert into label (label) values ('!'+''+padl(ix,6,'0')+'!')
Endfor
HTH