![]() |
problem programming outside the startevent
Hi, Im trying to program outside the startevent that is created when
you open a new excel project in VSTO. My code is: Excel.Worksheet ws = new Excel.WorksheetClass(); ws = (Excel.WorksheetClass)ThisApplication.ActiveWorkbo ok.ActiveSheet; Excel.Range r = ws.get_Range(ws.Cells[1,1], ws.Cells[2,2]); r.MergeCells = true; When I have some of this code in some method but the startevent, it fires an exception. It doesn't show any errors when I compile or anything. someone knows what to do ? |
All times are GMT +1. The time now is 12:07 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com