How can I use FSO instructions in my project??
-
I wrote the next thing, but it's not working: Dim fso As filesystemobject ----------------------------------- Private Sub Form_Load() fso.createfolder ("c:\project\global\") End Sub The VB doesn't change the letters to Capital letters ( Like: fso.CreateFolder ("....") and FilesystemObject. Is it any problem to work with FSO in PCs which are not connected to server??? What can I do??? Ahuva
-
I wrote the next thing, but it's not working: Dim fso As filesystemobject ----------------------------------- Private Sub Form_Load() fso.createfolder ("c:\project\global\") End Sub The VB doesn't change the letters to Capital letters ( Like: fso.CreateFolder ("....") and FilesystemObject. Is it any problem to work with FSO in PCs which are not connected to server??? What can I do??? Ahuva
-
Did you add a reference to the Microsoft Scripting Runtime? You can do that from the project menu -> references
Thank you very much Jon!!! I did it, and I also changed the "Dim ...." line to fso = CreateObject("scripting.FileSystemObject") (I saw this line in an Internet site, which explain about fso). Now it is working, but I have other problem. I wrote the next code, which is related to 2 buttons ( command2 and command3): Private Sub Command2_Click() Set fso = CreateObject("scripting.FileSystemObject") fso.createfolder ("c:\program Files\Ahuva\") End Sub Private Sub Command3_Click() Set d = CreateObject("scripting.FileSystemObject") d.createfile ("c:\program files\Ahuva\testing.txt") End Sub The operation of command2_click() is working, but there is a problem to operate command3_click(). The error message, which is displayed, is: " Object doesn't support this proparty or method." Can you help me with this problem??? Thak you again Jon. Ahuva
-
Thank you very much Jon!!! I did it, and I also changed the "Dim ...." line to fso = CreateObject("scripting.FileSystemObject") (I saw this line in an Internet site, which explain about fso). Now it is working, but I have other problem. I wrote the next code, which is related to 2 buttons ( command2 and command3): Private Sub Command2_Click() Set fso = CreateObject("scripting.FileSystemObject") fso.createfolder ("c:\program Files\Ahuva\") End Sub Private Sub Command3_Click() Set d = CreateObject("scripting.FileSystemObject") d.createfile ("c:\program files\Ahuva\testing.txt") End Sub The operation of command2_click() is working, but there is a problem to operate command3_click(). The error message, which is displayed, is: " Object doesn't support this proparty or method." Can you help me with this problem??? Thak you again Jon. Ahuva
Hi Ahuva, the FileSystemObject object ;) does not have a method named "createfile". Use CreateTextFile instead. Good luck. Volodya Ahuva wrote: Set d = CreateObject("scripting.FileSystemObject") d.createfile ("c:\program files\Ahuva\testing.txt") Volodya Orlenko, orlenko [at] hotmail [dot] com