掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
Excelのロセスを終了する方法は?? (ID:115358)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
返信有難うございます。 ようやく皆様が言っている内容が理解できました。 これで自分では間違っていないと思うのですが☆のところで エラーがでてしまいます。 Dim oExcel As Object Dim oBook As Object Dim oBooks As Object Dim oSheets As Object Dim oSheet As Object oExcel.Visible = False oBooks = oExcel.Workbooks oBook = oBooks.Open(FilePach) oSheets = oExcel.worksheets osheet = oSheets(Trim(lotNo)) System.Runtime.InteropServices.Marshal.ReleaseComObject(oSheets) oSheet.Close(False) ☆(ここでエラー) System.Runtime.InteropServices.Marshal.ReleaseComObject(oSheet) oSheet = Nothing System.Runtime.InteropServices.Marshal.ReleaseComObject(oBooks) oBook.Close(False) System.Runtime.InteropServices.Marshal.ReleaseComObject(oBook) oBook = Nothing oExcel.Quit() System.Runtime.InteropServices.Marshal.ReleaseComObject(oExcel) oExcel = Nothing GC.Collect() oSheetオブジェクトは必要なのでしょうか??
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.