I am trying to learn about create DLL's in CSharp. I came across the following website page http://www.geeksengine.com/article/create-dll.html
and was trying to replicate the example. I have named my project "LibTest".
In my folder C:\Users\user\Documents\Vi
sual Studio 2008\Projects\Mine\LibTest
in\Debug I have three files, LibTest.dll, LibTest.pdb &LibTest.tlb.
I made the LitTest.tlb file by using the following command prompts which I used from a previous question on here.
k ""C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat""
regasm /tlb:LibTest.tlb "C:\Users\user\Documents\V
isual Studio 2008\Projects\Mine\LibTest
When I go to Excel I can add the refernce by selecting the LibTest.tlb file. In the VBA editor when I define a variable objLib the intelliSense suggests the LibTest.Calc as a class. However my problem is when i use the line (shown below) objLib.SetNumberOne the intellisense doesn't pop up with any suggestions & nothing happens.
I read that I needed to use "codebase" with RegAsm. I tried this but could not do it. Please see the error message in the attached word document.
If you could also please explain in english what I'm actually doing that would be brillant.
Public Function test()
Dim lngResult As Long
Dim objLib As LibTest.Calc
Set objLib = New LibTest.Calc
lngResult = objLib.Add()