+ -
当前位置:首页 → 问答吧 → 关于文件:打开,读、写,关闭

关于文件:打开,读、写,关闭

时间:2011-09-27

来源:互联网

能介绍一下文件打开,读/写,关闭吗?

最好要一些Code;

作者: golden8510   发布时间: 2011-09-27

'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
'过程功能:
'功能描述:Input方式读入文件
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Private Sub btnInput_Click()
On Error GoTo errSub
  strMemo = ""
  intFileNum = FreeFile(0)
  Open strFile For Input As #intFileNum
  Do While Not EOF(intFileNum)
  Line Input #intFileNum, strMemo
  txtMemo.Text = txtMemo.Text & strMemo & vbCrLf
  Loop
  Close #intFileNum
  Exit Sub
errSub:

End Sub

作者: Veron_04   发布时间: 2011-09-27

热门下载

更多