Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Iron Speed
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old August 19th, 2004, 02:36 AM
vivian vivian is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 1 vivian User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Manipulating to 2text files into a resulting text file(vb)

Hi there

can you please help me with the vb code that will open 2

textfiles and save the data into the third one.the first

file contains the agentcode and the second one contains the

12 products.Each agentcode must be given the 12 products and

save the results into the third one.

AGENTCODESAQ/01/000
AQ/01/001
AQ/01/002
AQ/01/003
AQ/01/004
AQ/01/005
AQ/01/006
AQ/01/007
AQ/01/008
AQ/01/009
AQ/01/010

THE PRODUCTS FILE

ALE 12 15 16 20
GAP 50 25 70 50
GRO 55 60 70 90
HPP 120 150 120 100
HVP 55 80 75 63
MBB 83 60 75 20
MFB 66 55 99 100
PRO 78 100 89 45
RFM 200 300 555 990
RHP 88 450 44 566
RPG 60 70 88 755
RPV 66 90 78 63


THE RESULTS MUST LOOK LIKE THIS(with all the agents code)
Agent Code Prod
AQ/01/000 ALE 12 15 16 20
AQ/01/000 GAP 50 25 70 50
AQ/01/000 GRO 55 60 70 90
AQ/01/000 HPP 120 150 120 100
AQ/01/000 HVP 55 80 75 63
AQ/01/000 MBB 83 60 75 20
AQ/01/000 MFB 66 55 99 100
AQ/01/000 PRO 78 100 89 45
AQ/01/000 RFM 200 300 555 990
AQ/01/000 RHP 88 450 44 566
AQ/01/000 RPG 60 70 88 755
AQ/01/000 RPV 66 90 78 63
AQ/01/001 ALE 12 15 16 20
AQ/01/001 GAP 50 25 70 50
AQ/01/001 GRO 55 60 70 90
AQ/01/001 HPP 120 150 120 100
AQ/01/001 HVP 55 80 75 63
AQ/01/001 MBB 83 60 75 20
AQ/01/001 MFB 66 55 99 100
AQ/01/001 PRO 78 100 89 45
AQ/01/001 RFM 200 300 555 990
AQ/01/001 RHP 88 450 44 566
AQ/01/001 RPG 60 70 88 755
AQ/01/001 RPV 66 90 78 63

I'VE TRIED THE DO WHILE LOOP BUT I DON'T GET THE RESULT

THAT I'M LOOKING FOR

Set f = fso.OpenTextFile(path, ForReading)
Dim line As StringA
Dim final_file As String
Dim sh_string As String
Dim file As String
Dim file_final As String

file_final = text_write.Caption

line = "a"
Do While line <> ""


line = f.ReadLine


Open file_final For Input As #2
file = "a"
Do While file <> ""

file = f.ReadLine
Line Input #2, inputdata
file = inputdata & vbCrLf



final_file = line & Space(5) & file
str = ""


show_string = show_string & final_file & vbCrLf
'**************************
final_file = ""

Loop


Loop
MsgBox show_string
Call write_2_file(show_string)

Reply With Quote
  #2  
Old August 19th, 2004, 06:19 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 18 h 51 m 25 sec
Reputation Power: 180
Have you stepped through your code with the debugger?
__________________
======
Doug G
======
I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Manipulating to 2text files into a resulting text file(vb)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

IBM developerWorks




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway