Dear All,

I wrote the code for uploading the text file into the vb application. It is working well once I uploaded and cleared that contents in vb application .once againg I tried to open the file then it showed me open dialog box. I clicked on cancle button then it is showing the previous text file data. My requirement is When I Clicked on cancle button if does not show the previous text file contents. I am mentioning my code bellow.
Code:
Private Sub Command2_Click()
On Error GoTo cancelthis
  CommonDialog1.ShowOpen
  file$ = CommonDialog1.FileTitle
  Text2.text = ""
  Open file$ For Input As #1
  While Not EOF(1)
      Input #1, a$

      Text2.text = Text2.text + a$ + Chr$(13) + Chr(10)

Wend
Close #1
cancelthis:
End Sub
How can I remove the old text file contents
Please let me know the solution as early as possible
Regrds,
Venky