PC Review


Reply
Thread Tools Rate Thread

Edit a specific line in a text file

 
 
=?Utf-8?B?U2hpbW15?=
Guest
Posts: n/a
 
      10th Nov 2003
Line 50 of my text file says "default =" . I want to edit this line to what a user types in to a textbox (ie. if user types "54" into the control the line would now read "default =54").

Any help is appreciated.

Shimmy
 
Reply With Quote
 
 
 
 
Larry Linson
Guest
Posts: n/a
 
      10th Nov 2003
And you want this written back to the text file?

Use the classic file I/O: Open and LineInput and Print #, to Copy each line
to a new text file, up to the line you want to change. Read in this line,
append the numbers you want (in your example "54") So that it reads
"default=54", use Print # to write it out to the new file. Then copy each
line until the input text file reaches EOF.

Larry Linson
Microsoft Access MVP


"Shimmy" <(E-Mail Removed)> wrote in message
news:2CC61B19-7E43-4B48-9AE0-(E-Mail Removed)...
> Line 50 of my text file says "default =" . I want to edit this line to

what a user types in to a textbox (ie. if user types "54" into the control
the line would now read "default =54").
>
> Any help is appreciated.
>
> Shimmy



 
Reply With Quote
Reply

Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to store/read listbox items in a text file line by line (with line break) ? kimiraikkonen Microsoft VB .NET 6 2nd Nov 2007 06:27 PM
Change the color of text at a specific location on each text line =?Utf-8?B?QnJpYW4gQ29vaw==?= Microsoft C# .NET 7 26th Sep 2007 03:14 PM
retrieve a specific line in text file kevin arana Microsoft VB .NET 5 31st Oct 2005 04:02 PM
In specific document I cannot edit (delete) any text via keyboard =?Utf-8?B?Um9iZXJ0byBDYWJlc3Rhbnk=?= Microsoft Word Document Management 1 20th Oct 2005 05:57 PM
rich text box, finding line #, scrolling to specific line ray well Microsoft VB .NET 0 17th Aug 2005 05:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:37 PM.