Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How can I use FSO instructions in my project??

How can I use FSO instructions in my project??

Scheduled Pinned Locked Moved Visual Basic
questionsysadminhelp
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ahuva
    wrote on last edited by
    #1

    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

    J 1 Reply Last reply
    0
    • A 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

      J Offline
      J Offline
      Jon Gohr
      wrote on last edited by
      #2

      Did you add a reference to the Microsoft Scripting Runtime? You can do that from the project menu -> references

      A 1 Reply Last reply
      0
      • J Jon Gohr

        Did you add a reference to the Microsoft Scripting Runtime? You can do that from the project menu -> references

        A Offline
        A Offline
        Ahuva
        wrote on last edited by
        #3

        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

        V 1 Reply Last reply
        0
        • A 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

          V Offline
          V Offline
          Volodya Orlenko
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups