How do I use FileSystemObject in VBA?

前端 未结 5 839
萌比男神i
萌比男神i 2020-11-22 02:50

Is there something that I need to reference? How do I use this:

Dim fso As New FileSystemObject
Dim fld As Folder
Dim ts As TextStream

I am

5条回答
  •  隐瞒了意图╮
    2020-11-22 03:37

    These guys have excellent examples of how to use the filesystem object http://www.w3schools.com/asp/asp_ref_filesystem.asp

    <%
    dim fs,fname
    set fs=Server.CreateObject("Scripting.FileSystemObject")
    set fname=fs.CreateTextFile("c:\test.txt",true)
    fname.WriteLine("Hello World!")
    fname.Close
    set fname=nothing
    set fs=nothing
    %> 
    

提交回复
热议问题