回答編集履歴

2

追記しました

2020/10/28 08:15

投稿

tatsu99
tatsu99

スコア5470

test CHANGED
@@ -14,6 +14,18 @@
14
14
 
15
15
 
16
16
 
17
+ ```VBA
18
+
19
+ Sub Macro1()
20
+
21
+ CreateObject("WScript.Shell").Run "CMD.EXE /k D: & cd D:\goo\python & python sample.py"
22
+
23
+ End Sub
24
+
25
+
26
+
27
+ ```
28
+
17
29
  D:\goo\python下にsample.pyがあります。
18
30
 
19
31
  sample.pyの内容

1

追記しました

2020/10/28 08:15

投稿

tatsu99
tatsu99

スコア5470

test CHANGED
@@ -5,6 +5,12 @@
5
5
  2.cd D:\goo\python
6
6
 
7
7
  3.python sample.py
8
+
9
+ 複数のコマンドを実行す場合は & で連結します。
10
+
11
+ コマンド1 & コマンド2 & コマンド3
12
+
13
+ のようになります。
8
14
 
9
15
 
10
16