Create a folder and sub folder in Excel VBA

后端 未结 13 1583
梦谈多话
梦谈多话 2020-11-28 05:43

I have a pull down menu of companies that is populated by a list on another sheet. Three columns, Company, Job #, and Part Number.

When a job is created I need a fo

13条回答
  •  借酒劲吻你
    2020-11-28 06:03

    I found a much better way of doing the same, less code, much more efficient. Note that the """" is to quote the path in case it contains blanks in a folder name. Command line mkdir creates any intermediary folder if necessary to make the whole path exist.

    If Dir(YourPath, vbDirectory) = "" Then
        Shell ("cmd /c mkdir """ & YourPath & """")
    End If
    

提交回复
热议问题