回答編集履歴
3
推敲
answer
CHANGED
@@ -6,5 +6,5 @@
|
|
6
6
|
Set acApp = New Access.Application 'オブジェクト変数のインスタンス化
|
7
7
|
acApp.OpenCurrentDatabase(ConPath, False, ConPass) 'データベースファイルをオープン
|
8
8
|
|
9
|
-
acApp.DoCmd.TransferText acExportDelim, , "T
|
9
|
+
acApp.DoCmd.TransferText acExportDelim, , "T社員データ", path, True
|
10
10
|
```
|
2
追記
answer
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
DoCmdはそのAccessファイルに対して行うものなので、参照が必要です。
|
2
|
+
[アプリケーションの OpenCurrentDatabase メソッド (Access)](https://docs.microsoft.com/ja-jp/office/vba/api/access.application.opencurrentdatabase)
|
2
3
|
```VBA
|
3
4
|
Dim acApp As Access.Application
|
4
5
|
|
1
追記
answer
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Dim acApp As Access.Application
|
4
4
|
|
5
5
|
Set acApp = New Access.Application 'オブジェクト変数のインスタンス化
|
6
|
-
acApp.OpenCurrentDatabase
|
6
|
+
acApp.OpenCurrentDatabase(ConPath, False, ConPass) 'データベースファイルをオープン
|
7
7
|
|
8
8
|
acApp.DoCmd.TransferText acExportDelim, , "T資格管理", path, True
|
9
9
|
```
|