Important alert: (current site time 7/16/2013 1:11:53 AM EDT)
 

winzip icon

[ SaveText - LoadText Functions For TextBox ]

Email
Submitted on: 11/18/2004 9:11:23 AM
By: JJJJJJJJ  
Level: Beginner
User Rating: By 46 Users
Compatibility: VB 6.0
Views: 31450
(About the author)
 
     This is an example of 'SaveText' - 'LoadText' functions for TextBoxes.It is easy to use and works smoothly. I Need your 'FeedBack' and never forget to -Rate- this code.
 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 43 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

11/18/2004 10:59:01 PMJim Jose

Please add your comments.

BY,
Jim Jose
(If this comment was disrespectful, please report it.)

 
12/9/2004 2:59:57 AM

i have tried and tried to save text from a text box all in vain till I saw this code......Excellent Code!
(If this comment was disrespectful, please report it.)

 
12/9/2004 8:56:24 AMJim Jose

Thank you.I am happy to know that,it came usefull to you.

By
Jim Jose
(If this comment was disrespectful, please report it.)

 
1/16/2005 4:40:49 AM

great
(If this comment was disrespectful, please report it.)

 
1/28/2005 1:23:35 AM

this is all cool and all but how do I seperate information from a text file, and save it to a differnt file?
(If this comment was disrespectful, please report it.)

 
1/30/2005 2:37:13 AMJim Jose

Hi Shyla,
I think you only need this much,

Dim TxtSource As String
TxtSource = LoadText([Source FileName])
SaveText TxtSource, [Destination FileName]

By
Jim Jose


(If this comment was disrespectful, please report it.)

 
3/26/2005 1:16:25 PM

thanks man how can i get it working on a list box?
(If this comment was disrespectful, please report it.)

 
4/18/2005 1:40:45 AMstegasaurus

This is great! i have used it all the time since i downloaded it.5 globes!!!
(If this comment was disrespectful, please report it.)

 
5/19/2005 7:22:58 AM

Jim,
It worked perfectly! Thx.
(If this comment was disrespectful, please report it.)

 
6/15/2005 6:17:02 PM

How would this work if say Im making an AIM program with tocSock?
(If this comment was disrespectful, please report it.)

 
11/27/2005 7:04:23 AMJoe

I dont know if you still check on this but i got a prob with it..

Instead of Over righting the file it just add to whats already in it.

Im useing this method as a configuration file method and since it just adds to it.

I can't use it.

If you could plz tell me how to have it over right and not add to the text file id like that very much
(If this comment was disrespectful, please report it.)

 
11/27/2005 8:34:50 AMJim Jose

Joe, this happens bcose the file was opened in append mode. If u need to overwrite the existing file... first delete the file with the function kill(FileName)... and then use the SaveText function.

I think it helps!!
(If this comment was disrespectful, please report it.)

 
2/21/2006 7:19:02 AMNorm Cook

You should avoid using hardcoded file handles, i. e. 'As #1'. Use the FreeFile function to obtain your file handles, e. g. FNum = FreeFile, then
'As FNum'.
(If this comment was disrespectful, please report it.)

 
3/28/2006 7:38:52 PMJesus Barrios

Es un excelente codigo, fácil, sencillo y se puede usar en muchas aplicaciones
It is e Excelent code, easy, single and I can use it, in other Aplications
Jesus Barrios fron Venezuela S.A
I wil like translate the labels an other to Spanish for you get the votes from latinamerican programers.
(If this comment was disrespectful, please report it.)

 
5/18/2006 7:05:30 AMHardStream Software Development

good code.. works really well :D

@Jesus: Latin-American programmers should learn English..
(If this comment was disrespectful, please report it.)

 
8/25/2006 1:51:54 AMzubairvp

good code..

(If this comment was disrespectful, please report it.)

 
8/28/2006 10:11:23 PMNATS

NICE ONE..VERY GOOD FOR LEARNERS,VERY USEFUL..THNX DUDE
(If this comment was disrespectful, please report it.)

 
1/12/2007 2:19:13 AMdarq

it helps for my project thanks
(If this comment was disrespectful, please report it.)

 
2/20/2007 1:18:29 AMTie

Im only 11 and i started to programe at 9 years old, but this is the best load and save .txt applince i have ever seen thx....
(If this comment was disrespectful, please report it.)

 
6/22/2007 5:10:51 AMAbsiinth

I,v gone through hell looking for such. thnx jose
(If this comment was disrespectful, please report it.)

 
10/1/2007 2:37:47 AMFIFO

This is great. You better try it.
(If this comment was disrespectful, please report it.)

 
10/4/2007 7:59:27 AMJason Newland

Tie said "Im only 11 and i started to programe at 9 years old", how is that possible? lol, that'd make you 2 - you would have only been learning to talk and walk then.
(If this comment was disrespectful, please report it.)

 
10/4/2007 8:00:28 AMJason Newland

scatch that last comment, i thought he said "programming for 9 years", my mistake, sorry
(If this comment was disrespectful, please report it.)

 
3/17/2008 12:02:14 AMjoey

hi joe,

to overwrite the files as you said, you only need to change the "append" on the statement below to "output"
...
Open FileName For Append As #1
make it Open FileName for Output as #1
or better still find a free file number...

Dim filenum as integer
filenum=FreeFile
Open FileName for Output as #filenum

which is found in the module... i hope this would help anyone...(beginner)... please disregard this if you already found the solution..."killing" the file is inappropriate, and add more codes....
(If this comment was disrespectful, please report it.)

 
3/10/2009 12:43:46 PMPawan

this code is dam good & works fine without any problem.........thanks a ton buddy.......
(If this comment was disrespectful, please report it.)

 
9/12/2009 12:43:06 PMgussenica

great peace of code, 5 globes from me
(If this comment was disrespectful, please report it.)

 
3/17/2010 9:56:40 AMCrod

very nice; simple
(If this comment was disrespectful, please report it.)

 
4/8/2010 2:48:36 AMmarco

thanxxxxxxxx
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.