473,387 Members | 1,423 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Need some help with duplicating lines ! !

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

May 19 '06 #1
0 2146

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Chris Reedy | last post by:
For everyone - Apologies for the length of this message. If you don't want to look at the long example, you can skip to the end of the message. And for the Python gurus among you, if you can...
7
by: Timothy Shih | last post by:
Hi, I am trying to figure out how to use unmanaged code using P/Invoke. I wrote a simple function which takes in 2 buffers (one a byte buffer, one a char buffer) and copies the contents of the byte...
0
by: rmli | last post by:
Duplicating a Database using RMAN http://quickdba.blogspot.com/2006/05/duplicating-database-using-rman_22.html
1
by: | last post by:
I have made a web application that is giving me an error in loading assemblies. It reports file not found (error message below). I know I have the .dll in the .bin directory for the application.: ...
0
by: raypjr | last post by:
Hi everyone. I'm new here and hope I can get a little advice on how to list my array into a ListBox. I have my structure and array of structures. I need help with a For Loop that will list the...
2
by: raypjr | last post by:
Hi everyone. I'm new here and hope I can get a little advice on how to list my array into a ListBox. I have my structure and array of structures. I need help with a For Loop that will list the...
3
by: wickedHangover | last post by:
Ok, so I have my default.aspx page and with it all the contents that it needs for the default.aspx.cs page. What i want to do is seperate parts of the .CS file into a class I would call ServerConnect...
7
by: Albennett | last post by:
Hello. I’m new to writing VBA code but getting there thanks, for the most part, to the excellent advice on this site. I trying to create the code which will allow all records from a subform to...
4
by: Barno77 | last post by:
Everytime I edit a record, and hit update I get duplicating lines in my Details View. Here's my If statement: If (Len(e.OldValues("AutoNumber")) > 0) Then sql = "UPDATE SHIP_LOG SET...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.