Excel VBA Check if directory exists error

后端 未结 7 988
别那么骄傲
别那么骄傲 2020-12-01 10:34

I have a spreadsheet that upon clicking a button will duplicate itself by copying/pasting everything to a new workbook and save the file with a name that is dependent upon s

7条回答
  •  旧时难觅i
    2020-12-01 11:05

    If Len(Dir(ThisWorkbook.Path & "\YOUR_DIRECTORY", vbDirectory)) = 0 Then
       MkDir ThisWorkbook.Path & "\YOUR_DIRECTORY"
    End If
    

提交回复
热议问题