Search VB Files for text.
I am trying to make an application that will search all .bas, .frm. .cls files in a folder for the words "Fatal" and "msgBox". I want it to find these words and copy the line that these words are on, the line before and copy them into a word or text file. It would also be nice to have it so that the filename ex: frmMain.frm could be used as a heading before the fatal and msgbox lines.
Ex:
frmMain.frm
fatal"Error"
msgBox "bla blah blah"
Fatal "error 2"
frmBlah.frm
fatal "error"
Anyone got any ideas or help woth some of the code to be able to make this?
thnaks in advance.
1 Attachment(s)
Re: Search VB Files for text.
I made a toy example to do this. Try it out it will probably get you started.
Re: Search VB Files for text.
Thanks, thats a good help.
Re: Search VB Files for text.
anyone have any ideas how i could search a textfile for the words Fatal and msgbox, Then copy the entire line?
Re: Search VB Files for text.
That project I uploaded is easily adaptable to do whatever you need.