VBA 写入文本文件
时间:2010-03-18 22:55来源:虫虫技术在线收集整理 作者:虫虫编辑 点击:次
代码如下: Function WriteFile() Dim fs,a As Object Set fs=CreateObject( Scripting.FileSystemObject ) Set a=fs.createtextfile(ThisWorkbook.Path \ Get_Pictures.html, True ) For RowNo=1 To RowsCount strC= C RowNo a.write(Range(strC)) Next
代码如下:
- Function WriteFile()
-
- Dim fs, a As Object
- Set fs = CreateObject("Scripting.FileSystemObject")
- Set a = fs.createtextfile(ThisWorkbook.Path & "\" & "Get_Pictures.html", True)
- For RowNo = 1 To RowsCount
- strC = "C" & RowNo
- a.write (Range(strC))
- Next
- a.Close
-
- End Function
(责任编辑:admin) |
------分隔线----------------------------