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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Creating a file directory VB

Creating a file directory VB

Scheduled Pinned Locked Moved Visual Basic
linuxhelptutorialquestion
2 Posts 2 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.
  • N Offline
    N Offline
    New_Coder
    wrote on last edited by
    #1

    Does any one know how to create a windows director using VB code The below code opens an explorer window to the correct file path, but when try to create a new folder I get an error "Object does not support this property or method" Any Ideas? Private Sub Test_Open_Click() Dim SH, OpenThis, Save_Path Dim Create_Folder, ThisFolder SavePath = "c:\Project" Set SH = CreateObject("shell.application") OpenThis = SAVE_PATH SH.Open OpenThis SH.MkDir (SAVE_PATH & "NewDir") Set SH = Nothing End Sub

    D 1 Reply Last reply
    0
    • N New_Coder

      Does any one know how to create a windows director using VB code The below code opens an explorer window to the correct file path, but when try to create a new folder I get an error "Object does not support this property or method" Any Ideas? Private Sub Test_Open_Click() Dim SH, OpenThis, Save_Path Dim Create_Folder, ThisFolder SavePath = "c:\Project" Set SH = CreateObject("shell.application") OpenThis = SAVE_PATH SH.Open OpenThis SH.MkDir (SAVE_PATH & "NewDir") Set SH = Nothing End Sub

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      There's no such method as Mkdir in the Shell.Application object. it helps to read the documentation on these things instead of just assuming they understand DOS commands. You're looking for this[^].

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008

      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