随笔 - 493  文章 - 0  评论 - 97  阅读 - 239万
  2011年2月28日
摘要: '向指定的文件写字符串,第三个参数指定是否删除原来的内容Function Z_WriteLog(sFileName, sText) Dim fs, fso, sLog sLog = Now() & ": " & sText set fs = CreateObject("Scripting.FileSystemObject") set fso = fs.OpenTextFile(sFileName, 8, True) '第三个参数表明文件不存在,则新建文件 fso.WriteLine sLog fso.Close set f 阅读全文
posted @ 2011-02-28 18:16 清清飞扬 阅读(1718) 评论(0) 推荐(0) 编辑
摘要: '向指定的文件写字符串,第三个参数指定是否删除原来的内容Function Z_WriteFile(sFileName, sText, bAppend) Dim fs, fso, iomode if bAppend = True Then iomode = 8 'ForAppending else iomode = 2 'ForWriting end if set fs = CreateObject("Scripting.FileSystemObject") set fso = fs.OpenTextFile(sFileName, iomode, Tr 阅读全文
posted @ 2011-02-28 17:59 清清飞扬 阅读(802) 评论(0) 推荐(0) 编辑
摘要: On error resume Next'删除字符串最右边的字符chsFunction MyRTrim(src, chs) '删除字符串最右边的字符chs(可多个) Dim pos, sLeft src = Trim(src) pos = InStrRev(src, chs) '查找最后一个字符chs if(pos > 0 and Len(Mid(src, pos+1)) = 0) Then sLeft = Left(src, pos - 1) '去除最后一个chs MyRTrim = MyRTrim(sLeft, chs) '去除尾部的chs e 阅读全文
posted @ 2011-02-28 14:54 清清飞扬 阅读(1430) 评论(0) 推荐(0) 编辑
< 2025年3月 >
23 24 25 26 27 28 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 1 2 3 4 5

点击右上角即可分享
微信分享提示