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 10,068 of 10,840   
   Henkie to All   
   Need some help with duplicating lines !    
   19 May 06 07:44:23   
   
   From: tellnobody@at.all   
      
   Hello all, I have the following that I can not getting work, for example   
   my input file is as below   
      
   Test01,Bitmap01,01   
   Test02,Bitmap02,02   
   Test04,Bitmap04,04   
   Test05,Bitmap05,05   
   Test03,Bitmap03,03   
      
   The file I want created out of this is as below   
      
   Test01,Bitmap01,01   
   Test02,Bitmap02,02   
   Test02,Bitmap02,02   
   Test04,Bitmap04,04   
   Test04,Bitmap04,04   
   Test04,Bitmap04,04   
   Test04,Bitmap04,04   
   Test05,Bitmap05,05   
   Test05,Bitmap05,05   
   Test05,Bitmap05,05   
   Test05,Bitmap05,05   
   Test05,Bitmap05,05   
   Test05,Bitmap05,05   
   Test03,Bitmap03,03   
   Test03,Bitmap03,03   
   Test03,Bitmap03,03   
      
   I want for each line in the output as many lines as   
   are giving in the input file in charcter 17 till 18   
   I think that is clear how I want te output.   
      
   the code I using is here below but that is not   
   working, i hope that someone can help me   
   on the good way. I am rather new in VB   
      
      
       Dim NumberOfLines   
       Dim Counter   
       Counter =1   
       '   
       Do While Not EOF(1)   
       '   
       Counter = Format$(Counter, "00")   
       Line Input #1, A$   
       NumberOfLines = Mid(A$, 17, 2)   
       If Counter <> NumberOfLines Then   
       Print #2, Left(A$, 18)   
       Counter = Counter + 1   
       'End If   
       Teller = 1   
       '   
       Loop   
      
       Now with this code my output file is the same as my input file :-(   
       Hope that someone can give me some help.   
      
   Greetings   
   Henkie   
      
   --- 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