|
执行这段代码后 输出的TXT却在上一级,还在本目录生成一个0KB的txt
本想输出的TXT在本目录,而且不生成0KB的TXT
是那里出错码?
Next
[S1].Resize(C.Count, 1) = Application.Transpose(C.keys)
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.createtextfile(ThisWorkbook.Path & "\" & Cells(2, 26).Value & ".TXT")
f.Close
Set f = Nothing
Set fso = Nothing
Open ThisWorkbook.Path & Cells(2, 26).Value & ".TXT" For Output As #1
r = Range("S65536").End(xlUp).Row
For i = 1 To r
x = Cells(i, 19)
Print #1, x
Next i
Close #1
End Sub
[ 本帖最后由 IF_8_THEN_OK 于 2010-3-5 18:28 编辑 ] |
|