From: Bulhac Mihai Date: 2007-09-30T16:19:48+09:00 Subject: Re: OLE Object - combo box problem Yes, this is what i want, tnx a lot, but it gives me this error: OLE error code:800A03EC in Microsoft Office Excel Programmatic access to Visual Basic Project is not trusted HRESULT error code:0x80020009 Exception occurred. from excel2.rb:205:in `excel_asitt_menu' from excel2.rb:349 my code is: modu = $asitt_workbook.VBProject.VBComponents.Item($worksheet_asitt_menu) modu.CodeModule.InsertLines(1, "Private Sub " + $combo_box + "_Change") modu.CodeModule.InsertLines(2, " MsgBox " + $combo_box + ".Text" ) modu.CodeModule.InsertLines(3, "End Sub") -- Posted via http://www.ruby-forum.com/.