回答編集履歴
1
追記
answer
CHANGED
@@ -7,4 +7,16 @@
|
|
7
7
|
If Not objFso.FolderExists(ThisWorkbook.Path & "\注文書2022" & "\" & Range("AA11") & "\" & Range("AA11") & Format(Date, "yyyy.mm")) Then
|
8
8
|
objFso.CreateFolder (ThisWorkbook.Path & "\注文書2022" & "\" & Range("AA11") & "\" & Range("AA11") & Format(Date, "yyyy.mm"))
|
9
9
|
End If
|
10
|
-
```
|
10
|
+
```
|
11
|
+
---
|
12
|
+
<追記>
|
13
|
+
少し書き換えてみました。
|
14
|
+
```
|
15
|
+
Dim wPath, wSubPath
|
16
|
+
wPath = ThisWorkbook.Path & "\注文書2022" & "\" & xRg.Value
|
17
|
+
wSubPath = wPath & "\" & xRg.Value & Format(Date, "yyyy.mm")
|
18
|
+
|
19
|
+
If Not objFso.FolderExists(wPath) Then objFso.CreateFolder wPath
|
20
|
+
If Not objFso.FolderExists(wSubPath) Then objFso.CreateFolder wSubPath
|
21
|
+
|
22
|
+
```
|