雪見酒です。 g-1 / sc5.so-net.ne.jpさんの<200403161123.i2GBN9P19892 / mail.sc5.so-net.ne.jp>から >実際にはクラスメンバとして >@excel = WIN32OLE.new..... >としているので > >def exit > @excel.quit > while WIN32OLE.ole_free(@excel) > 0 do end >end > >という感じなのですがこれが原因ではないですよね? どこで @excel = WIN32OLE.new.... しているのでしょうか? class Hoge attr :excel def initialize @excel=Win32OLE.new('Excel.Application') end def exit Win32OLE.ole_free(@excel) #Automationオブジェクトがインスタンス #単一に生成されることが保証されていれ #ばこれでもOK end end fuga=Hoge.new fuga.excel.visible=true . . fuga.excel.quit fuga.exit こんな感じなら大丈夫だと思うのですが。 Rubyから制御できないAutomationObjectを作っていませんか? 具体的なコードを示していただければ何かわかるかもしれません。 -- Yukimi Sake mailto:yukimi_sake / mbi.nifty.com http://homepage3.nifty.com/Yukimi_Sake/