![]() |
VSTO .net - Adding a Usercontrol unto Worksheet
I have been at it for a while now. I am still new to Vsto.
What I need is to add a usercontrol unto a worksheet. Kinda like chart object, but my object instead. I am using VSTO, VB.Net and Excel 2003. This is what I have so far: Dim Usercontrol As ExcelProject1.UserControl1 ThisWorkbook.ActiveSheet.oleobjects.add(classtype: =Usercontrol) it almost worked, but a message pops up saying "object not refrence o an object". Like I said, I am still new to Excel stuff, so I even tried to make a ActiveX. Registered, and used the VBA code ActiveSheet.OleObjects.Add Classtype:=ExcelProject1.UserControl1 Link:=false then it will say that disconnect from client. It might be a simple answer... And i prefer using the VSTO object instead of an ActiveX if possible, I just dont know what I am doin wrong. Another thing, since I am doing a test version, the usercontrol doe not have any control within, infact, i did not add any other code i there, it just has the base code of creating a usercontrol. dont know if that info would hep. thanks Phili -- Message posted from http://www.ExcelForum.com |
All times are GMT +1. The time now is 09:35 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com