質問編集履歴

2

2018/06/22 05:48

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -12,31 +12,25 @@
12
12
 
13
13
 
14
14
 
15
- Private Declare Function
16
-
17
- SetCurrentDirectory Lib "kernel32"
18
-
19
- Alias "SetCurrentDirectoryA" (ByVal
15
+ Private Declare Function SetCurrentDirectory Lib "kernel32" Alias "SetCurrentDirectoryA" (ByVal lpPathName As String) As Long
20
-
21
- lpPathName As String) As Long Sub
22
16
 
23
17
 
24
18
 
25
- S2_ChDir() '変更後パスFilePathの宣言 Dim
19
+ Sub S2_ChDir()
26
20
 
21
+ '変更後パスFilePathの宣言
27
22
 
23
+ Dim FilePath As String
28
24
 
29
- FilePath As String '変更するファイルパスの
25
+ '変更するファイルパスの指定
30
26
 
31
- 指定 FilePath = "¥¥◯◯¥■■¥△△" '変更
27
+ FilePath = "¥¥◯◯¥■■¥△△"
32
28
 
33
- の実行 Call
29
+ '変更の実行
34
30
 
31
+ Call SetCurrentDirectory(FilePath)
35
32
 
36
-
37
- SetCurrentDirectory(FilePath) End Sub
33
+ End Sub
38
-
39
-
40
34
 
41
35
  ' ¥¥◯◯¥■■¥△△~:ネットワークのパス
42
36
 

1

2018/06/22 05:48

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -4,11 +4,39 @@
4
4
 
5
5
  https://excwlvba.blogspot.com/2013/07/blog-post_24.html?m=1
6
6
 
7
+
8
+
9
+
10
+
7
11
  ```VBA
8
12
 
9
13
 
10
14
 
11
- Private Declare Function SetCurrentDirectory Lib "kernel32" Alias "SetCurrentDirectoryA" (ByVal lpPathName As String) As Long Sub S2_ChDir() '変更後パスFilePathの宣言 Dim FilePath As String '変更するファイルパスの指定 FilePath = "¥¥◯◯¥■■¥△△~" '変更の実行 Call SetCurrentDirectory(FilePath) End Sub
15
+ Private Declare Function
16
+
17
+ SetCurrentDirectory Lib "kernel32"
18
+
19
+ Alias "SetCurrentDirectoryA" (ByVal
20
+
21
+ lpPathName As String) As Long Sub
22
+
23
+
24
+
25
+ S2_ChDir() '変更後パスFilePathの宣言 Dim
26
+
27
+
28
+
29
+ FilePath As String '変更するファイルパスの
30
+
31
+ 指定 FilePath = "¥¥◯◯¥■■¥△△~" '変更
32
+
33
+ の実行 Call
34
+
35
+
36
+
37
+ SetCurrentDirectory(FilePath) End Sub
38
+
39
+
12
40
 
13
41
  ' ¥¥◯◯¥■■¥△△~:ネットワークのパス
14
42