|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
File handling in VBas follows: We have a notepad which consists of some data(Say A). Now we have a form in which we have some text fields & a command button. when we click cmd button once the data from the notepad should be read as strings of different sizes & displayed in the text boxes. Again when we click the cmd button the data in various text fields are written to another notepad(say B) after creating it & again the remaining data is read from the file A from the last position . also i need a way to search for an unique string in notepad B from the form & edit details around that string in file B. Pls help me.....i need this only in VB no other scripting as i don know about scripting. Also if anyone can tell me link where i can get details regarding file handling in detail in VB..i will b very helpful.. Binu C wrote:
Show quoteHide quote > hi am new to VB. I need to develop an application. The requirements are I would be surprised if anyone actually wrote some code for you. You> as follows: > > We have a notepad which consists of some data(Say A). Now we have a > form in which we have some text fields & a command button. when we > click cmd button once the data from the notepad should be read as > strings of different sizes & displayed in the text boxes. Again when we > click the cmd button the data in various text fields are written to > another notepad(say B) after creating it & again the remaining data is > read from the file A from the last position . > > also i need a way to search for an unique string in notepad B from the > form & edit details around that string in file B. > > Pls help me.....i need this only in VB no other scripting as i don know > about scripting. > > Also if anyone can tell me link where i can get details regarding file > handling in detail in VB..i will b very helpful.. request is how to do very basic types of operations that even a beginning program should either know or know how to figure out. I strongly suggest spending a few days studing the help, go buy a book on VB, and do a few Google searches for sample code. everyone has to start somewhere!
something like this should help get you started: 'reading in the first file Dim oFile As System.IO.File Dim oRead As System.IO.StreamReader Dim LineIn As String oRead = oFile.OpenText(Me.txtbox.Text) ' textbox where the file name is While oRead.Peek <> -1 'do what you want here ' i.e. stream writer end while za***@construction-imaging.com wrote: Show quoteHide quote > Binu C wrote: > > hi am new to VB. I need to develop an application. The requirements are > > as follows: > > > > We have a notepad which consists of some data(Say A). Now we have a > > form in which we have some text fields & a command button. when we > > click cmd button once the data from the notepad should be read as > > strings of different sizes & displayed in the text boxes. Again when we > > click the cmd button the data in various text fields are written to > > another notepad(say B) after creating it & again the remaining data is > > read from the file A from the last position . > > > > also i need a way to search for an unique string in notepad B from the > > form & edit details around that string in file B. > > > > Pls help me.....i need this only in VB no other scripting as i don know > > about scripting. > > > > Also if anyone can tell me link where i can get details regarding file > > handling in detail in VB..i will b very helpful.. > > I would be surprised if anyone actually wrote some code for you. You > request is how to do very basic types of operations that even a > beginning program should either know or know how to figure out. I > strongly suggest spending a few days studing the help, go buy a book on > VB, and do a few Google searches for sample code. jonathandr***@gmail.com wrote:
> 'reading in the first file Creating an instance of the File object is not necessary as the> Dim oFile As System.IO.File > Dim oRead As System.IO.StreamReader > Dim LineIn As String > oRead = oFile.OpenText(Me.txtbox.Text) ' textbox where the file name > is > While oRead.Peek <> -1 > 'do what you want here > ' i.e. stream writer > end while > OpenText method is Shared. Dim oRead As System.IO.StreamReader Dim LineIn As String oRead = File.OpenText(Me.txtbox.Text)
class library
Trouble with mouse click How to Load string into mshtml object? Detect WiFi Networks what method to use to add 1 day to a date (hotel reservation for one night by clicking on calender) Adding rows to a data table: Rows do not show up PLEASE HELP - Executable properties - right click How do I calculate the date of the previous day given a date ( in "MM/dd/yy" format) how to compare two date variables? Variable precision |
|||||||||||||||||||||||