create a .txt file through VB - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Forum: Plug-Ins (/forumdisplay.php?fid=28) +------ Thread: create a .txt file through VB (/showthread.php?tid=25448) create a .txt file through VB by _BassReFLeX_ on 05-18-2004 at 02:36 PM
Hi there. RE: create a .txt file through VB by Stigmata on 05-18-2004 at 02:42 PM
put into a button or something code: if something is not there, vb automaticly creates it edit : more advance version code: RE: create a .txt file through VB by _BassReFLeX_ on 05-18-2004 at 02:45 PM hell. thank you jw . thanks a lot m8 RE: create a .txt file through VB by Stigmata on 05-18-2004 at 03:03 PM thats ok RE: create a .txt file through VB by Mike on 05-18-2004 at 03:08 PM
BassReFlex... RE: create a .txt file through VB by Stigmata on 05-18-2004 at 03:11 PM why? we have good programmers here RE: create a .txt file through VB by _BassReFLeX_ on 05-19-2004 at 11:10 AM btw... how do i rewrite the same .txt file.. but not OVERWRITE just continue in blank lines .... RE: create a .txt file through VB by Mike on 05-19-2004 at 11:18 AM
You can read the data in the text before appending and then make a temp string and do: TempString = String1 & String2 RE: RE: create a .txt file through VB by Dempsey on 05-19-2004 at 01:40 PM
quote:dim filenum as integer filenum= freefile Open "C:\Text.txt" For Append As filenum Print filenum, Text1.Text Close filenum use append if you want to add to the file and output to rewrite it RE: create a .txt file through VB by matty on 05-19-2004 at 01:46 PM
code: It is easiest to use the vb Function App.Path & "\Whatever.txt" That means that the text file you are looking for is in the same place as the exe, its a lot easier then specifing an exact path because what happens if they install the application to another place RE: RE: create a .txt file through VB by Dempsey on 05-19-2004 at 05:14 PM
quote:i dont think that will work as if the file number is random it will be different each time, and it is specified a few times. This is my 200th post thats not many for nearly a year, maybe i should post more RE: create a .txt file through VB by CookieRevised on 05-19-2004 at 06:07 PM
quote:It doesn't have anything todo with the filenumber... "Open as random" can mean only two things (depening on which language you use): A) you can read or write randomly in the file. This means your can read or write to line 5, then to line 2, then to line 9, etc... or B) It means that you can read and write to the same open file... RE: create a .txt file through VB by _BassReFLeX_ on 05-21-2004 at 10:08 AM thanks a lot guys. you rock ! |