OK, the problem is what I thought it might be. The Len(lngNumber) thing isn't giving the right answer, so the numbers don't line up in the text file. I have no idea how the time of what I'm posting here compares to what we did already, but this will do what you need:

VB Code:
  1. Option Explicit
  2.  
  3. Private Sub Command_Click()
  4. Dim i As Long
  5. Dim lngMin As Long
  6. Dim lngMax As Long
  7. Dim iLen As Integer
  8. Dim sFilename As String
  9.  
  10. sFilename = App.Path & "\NumberList.txt"
  11.  
  12. iLen = CInt(Text1.Text)
  13. lngMin = CLng(Text2.Text)
  14. lngMax = CLng(Text3.Text)
  15.  
  16. Open "c:\temp\numbers.txt" For Output As #1
  17.     For i = lngMin To lngMax ' number to count to
  18.         Print #1, LPAD(CStr(i), iLen)
  19.     Next i
  20. Close #1
  21.  
  22. MsgBox "Finished"
  23.  
  24. End Sub
  25.  
  26. Private Function LPAD(sNumber As String, Length As Integer) As String
  27.  
  28. LPAD = String$(Length - Len(sNumber), "0") & sNumber
  29.  
  30. End Function