Check is destination directory exist then proceed if not then create it and proceed afterwards

前端 未结 3 970
-上瘾入骨i
-上瘾入骨i 2021-01-06 08:16

I have a button on one of the worksheets that lets user to continue with his task to save his/her template as a separate workbook in the folder.

Here is my code

<
3条回答
  •  庸人自扰
    2021-01-06 08:51

    If Dir(Fldrpath, vbDirectory) = "" Then
    MkDir Fldrpath
    End If
    

    Fldrpath refer to the Folderpath if Folder not found MkDir creates the folder

提交回复
热议问题