VB Project Help Urgently Needed

VB Project Help Urgently Needed

Post by mattigrego » Thu, 05 Feb 2004 19:53:41


I'm a highly inexperienced VB user and I need help quickly with a
school project (please note that asking for help like this is not
considered cheating or anything), and if anyone can provide with help
or even completed code for this simple operation I'd appreciate it
greatly.

The operation requires that one line of data is inputted from a text
file in the form:

Reynolds Josh HIS GEO ENG MUS GST 03/04/85

and be outputted by a VB program into another text file in the form

Josh Reynolds 03/04/85 HIS GEO ENG MUS GST

With those exact spacings (15/15/10/5/5/5/5/5).

I appreciate this is not complex but I have very little understanding
of VB, and this is very important, so I would reaaly be grateful for
any help you can give. Thankyou very much in advance, Matti.
 
 
 

VB Project Help Urgently Needed

Post by erewho » Thu, 05 Feb 2004 21:35:28


Look at :-

Dim
FreeFile
Open FileName For Input As #
Line Input
Split
UDTs
LSet
RSet
Open FileName For Binary As #
Put
Close

There is not much point in taking a class unless one learns
- if you follow that sequence, you'll get an Alpha

I'll start you off

Dim iSrcFileNo As Integer, S As String

iSrcFileNo = FreeFile
Open "SOURCEFILE" For Input As #iSrcFileNo
Line Input #iSrcFileNo, S
Close# iSrcFileNo

 
 
 

VB Project Help Urgently Needed

Post by rober » Fri, 06 Feb 2004 03:09:10


Use the LineInput method to get this line


Use the Space(n) method to add your spaces while rebuilding the
string, open the new file and save it.