Please try learning this somewhere else first. Use this more as a guideline. If you just copy and paste this.. you won't learn a thing. Thus, the harder stuff will seem impossible.
Opening a file
intNewFile = FreeFile
cdl1.Filter = "Text files (*.bat)|*.bat"
cdl1.ShowOpen
If cdl1.FileName <> "" Then
Open cdl1.FileName For Input As #intNewFile
txtFile.Text = ""
Do While Not EOF(intNewFile)
Line Input #intNewFile, strTextLine
txtFile.Text = txtFile.Text + strTextLine & vbCrLf
blnFile = True
Loop
Close #intNewFile
End If
strFileName = cdl1.FileName
timerCheckFile.Enabled = True
strStats = txtFile.Text
//********
saving a file
intNewFile = FreeFile
' cdl1.Filter = "Text file (*.txt)|*.txt"
cdl1.InitDir = "H:\ICS3M"
cdl1.Filter = "Text file (*.bat)|*.bat"
cdl1.Flags = cdlOFNOverwritePrompt
cdl1.ShowSave
If cdl1.FileName <> "" Then
Open cdl1.FileName For Output As #intNewFile
Print #intNewFile, txtFile.Text
Close #intNewFile
End If
strFileName = cdl1.FileName