home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,857 of 10,840   
   Johnny to All   
   Question about format   
   23 Jan 06 16:51:29   
   
   From: tellnobody@at.all   
      
   Hi all, I have a question,   
   I'am writing increment number in a file wich reset after reaching 15.   
      
   I have code like below.   
      
   Dim counter   
      
   Counter =1   
      
   and at the end of the input i have the line   
   counter = counter +1   
      
   All is fine so far but my output now is like below:   
      
   1   
   2   
   3   
   4   
   5   
   6   
   7   
   8   
   9   
   10   
   11   
   12   
   13   
   14   
   15   
      
   What I want is a leading zero that the output will be as follow:   
      
   01   
   02   
   03   
   04   
   05   
   06   
   07   
   08   
   09   
   10   
   11   
   12   
   13   
   14   
   15   
      
   I hope that anybody do have a solution for me.   
      
   Thanks in advance.   
      
      
   Data Manager   
   Mercurius Cards Company   
   Tel. (+31) 75-6476694   
   Fax.(+31) 75-6476676   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca