teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

Set wb = objExcel.Workbooks.Openに修正

2019/04/12 02:25

投稿

irohamaru
irohamaru

スコア15

title CHANGED
File without changes
body CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  Dim objExcel, wb As Object
14
14
  Set objExcel = CreateObject("Excel.Application")
15
- Set wb = Workbooks.Open(tgtPath, Password:=vbNullString)
15
+ Set wb = objExcel.Workbooks.Open(tgtPath, Password:=vbNullString)
16
16
 
17
17
  errDescription = Err.Description
18
18
  errNum = Err.Number