Skip to Content
0
Jul 28, 2005 at 02:46 PM

VBA and COM

22 Views

Hi everyone,

I am a really new at trying to call COM from VBA.

Here is what I've done.

a) I creates a Class Library in C# with a really simple method.

b) I created a tlb and snk file using sn.exe, gacutil.exe, regasm.exe.

I checked that my class is located in \windir\assembly.

c) I opend my Outlook 2002 and created a macro.

d)In the Tools->References menu, I selected the tlb file.

e) here is the code of the VBA macro:

Sub Macro1()

Dim objAdd As New ClassLibrary1.Class1

End Sub

This compile.

But, when I try to know the methods in the objAdd object...there aren't.

This object should contain the Add method to add 2 numbers.

Can someone help me with this issue ?

Thanks a lot.