欢 迎 光 临 大海的风's BLog

 ||  

 管理员登陆

 这就是我
  • 日志:363
  • 评论:101
  • 留言:4
  • 访问:

最新公告

本人主要开发过软件有:
<<工厂生产管理系统>>
<<人事管理系统>>
<<货仓管理系统>>
<<发票管理系统>>
<<智能IC卡考勤管理系统>>
<<智能IC卡门禁考勤管理系统>>
<<指文门禁考勤管理系统>>
<<智能巡检管理系统>>
<<酒楼点菜收银系统>>等

站点日历
<<  < 2006 - >  >>
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
最新日志
最新回复
最新留言
 日志搜索

友情链接
Powered By ShineBlog.com
 其他信息
·删除任意文件的指定行     -|fhbmonkey 发表于 2006-8-9 10:16:00

用法:
DeleteLineFromFile App.Path & "/test.txt", 3

函数:
Public Sub DeleteLineFromFile(RFile As String, RLine As Integer)
Dim FileNum As Integer
Dim TextLine As String
Dim NewText As String
Dim CurentLine As Integer
FileNum = FreeFile
Open RFile For Input As #FileNum


Do Until EOF(FileNum)
Line Input #FileNum, TextLine
currentline = currentline + 1


If Not currentline = RLine Then


If currentline = 1 Then
NewText = TextLine
Else
NewText = NewText & vbNewLine & TextLine
End If
End If
Loop
Close #FileNum
Open RFile For Output As #FileNum
Print #FileNum, NewText
Close #FileNum
End Sub

[阅读全文 | 回复(0) | 引用通告 | 编辑]

发表评论:[注册一个ShineBlog?]

    昵称:
    密码: (游客无须输入密码)
    主页:
    标题:
    正在载入数据,请稍候……
Email:fhbmonkey@sohu.com QQ:76111951   大海的风