|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Please Help Me.
I need to loacate a user in a file and remove that user without harming the rest of the file. Can Anyone Help ME? |
|
#2
|
||||
|
||||
|
im not that great at VB, but i do know a little bit so i will TRY help you. I beleive you can do a loop and search for a specific line of text, and i think the coding is something like this:
Code:
Dim a as string 'Declaring variable to temporarily store data, where a is the varible name Open filename.txt for random as #1 'open file as "random" to allow read and write Do until EOF(1) 'start loop to find what you are looking for After that i seem to kep confusing myself, i'll keep thinking of how to do it, if i get anywhere i'll let you know.
__________________
"Operator, Give me the number for 911" - Homer J Simpson JonnoWalmsley.com vv Latest Image vv
Last edited by sir_drinxalot : August 15th, 2003 at 04:36 AM. |
|
#3
|
||||
|
||||
|
If you built the file with get then you can use put to erase the record in question, but to do so you will have to put spaces in the place of the record. The other option that I know of would be to read the file in and re-write the file minus the record in question.
|
|
#4
|
|||
|
|||
|
Thanks I Got It Now
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Finding a line in a file and deleting it. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|