Private Sub Form_Load()TxtFile = "": txtFilename = ""End SubPrivate Sub Dir1_Change()File1.Path = Dir1.PathEnd SubPrivate Sub Drive1_Change()Dir1.Path = Drive1.DriveEnd SubPrivate Sub File1_Click()If Right(File1.Path, 1) = "\" ThentxtFilename = File1.Path & File1.FileNameElsetxtFilename = File1.Path & "\" & File1.FileNameEnd IfEnd Sub
Private Sub Combo1_Change()File1.Pattern = Combol1.TextEnd SubPrivate Sub Command1_Click()Dim InputStr As StringTxtFile = ""If txtFilename <> "" ThenOpen txtFilename For Input As #1Do While Not EOF(1)Line Input #1, InputStrTxtFile = TxtFile & InputStr & Chr(13) & Chr(10)LoopClose #1End IfEnd SubPrivate Sub Command2_Click()Open txtFilename For Output As #1Print
#1, TxtFileClose #1File1.RefreshEnd SubPrivate Sub Command3_Click()Kill txtFilenametxtFilenanme.Text = ""TxtFile = ""File1.RefreshEnd Sub