ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Creating Com object for excel using vb.net (https://www.excelbanter.com/excel-programming/291757-creating-com-object-excel-using-vbulletin-net.html)

pxiong[_2_]

Creating Com object for excel using vb.net
 
How can i create a com object so that i can embed into excel worksheet

--
Message posted from http://www.ExcelForum.com


ShockWave

Creating Com object for excel using vb.net
 
1) Go to VS.net and create a new classlibrary project under visua
basic.
2) delete the classfile that it generates and add a new item: a co
class item and give it whatever name you feel appropriate
3) VS.net will automaticcally create the headers/contsructors and th
guids...not to mention it will auto turn on the register as co
component in your project props
4) build your solution and then in excel go to the vba editor and add
reference to either the .dll or the .tlb file
5) create an instance of your com dll class such as
dim myClassInstance as new myDll.myClass
6) to call a function in your dll all you need to do is
myClassInstance.myDllFunction()
7)Tada :-

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 09:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com