Click here to Skip to main content
15,914,359 members
Home / Discussions / C#
   

C#

 
GeneralRe: Form using too much memory Pin
Charlie Williams24-Feb-04 12:35
Charlie Williams24-Feb-04 12:35 
GeneralRe: Form using too much memory Pin
CWIZO24-Feb-04 23:43
CWIZO24-Feb-04 23:43 
GeneralRe: Form using too much memory Pin
Charlie Williams25-Feb-04 10:28
Charlie Williams25-Feb-04 10:28 
GeneralRe: DateTime.Now in a label Pin
Nick Parker24-Feb-04 7:40
protectorNick Parker24-Feb-04 7:40 
GeneralRe: DateTime.Now in a label Pin
Dave Kreskowiak24-Feb-04 7:42
mveDave Kreskowiak24-Feb-04 7:42 
GeneralHelp, How to add a footer to a windows form Datagrid Pin
mdolby24-Feb-04 6:32
mdolby24-Feb-04 6:32 
GeneralRe: Help, How to add a footer to a windows form Datagrid Pin
Heath Stewart24-Feb-04 12:29
protectorHeath Stewart24-Feb-04 12:29 
GeneralHelp using C# COM Interop in VBA / Excel Pin
BeeBar24-Feb-04 4:49
sussBeeBar24-Feb-04 4:49 
I'm trying to create an Interop class in C# and use it as a COM object in VBA. After numerous failed attempts in my own code I tried with a simple example. This is what I have done:

using System;

namespace BeeComTest
{
public interface ITest
{
System.DateTime GetTime();
}

public class Test : ITest
{
public Test()
{
}

#region ITest Members
public DateTime GetTime()
{
return System.DateTime.Now;
}
#endregion
}
}

Compiled it into a dll called: BeeComTest.dll
(have strong signed it)

Next I ran from the command line:
gacutil /i BeeComTest.dll
tlbexp BeeComTest.dll

Then I opened up Excel and VBA:
Selected BeeComTest from Tools/References

The VBA Code used is:
__________________________________

Dim NetTest As BeeComTest.ITest

Sub Test()

Set NetTest = CreateObject("BeeComTest.test")
//Comment have also tried setting via following
//command, same error
// Set NetTest = New BeeComTest.Test
Debug.Print ".Net server returned: " + FormatDateTime (NetTest .GetTime, vbGeneralDate)

End Sub
__________________________________


Problem:
When I run the Macro (in debug stepping through the code) I get the following errow when the object is being Set...

Run-time error '429':

ActiveX component can't create object

Then the code exits.

I have searched far and wide and can't find any useful advice/help. If anyone has any idea's or suggestions why the COM object isn't being created it would be greatly appreciated.

Many thanks,
Bee


GeneralRe: Help using C# COM Interop in VBA / Excel Pin
Nick Parker24-Feb-04 6:44
protectorNick Parker24-Feb-04 6:44 
GeneralRe: Help using C# COM Interop in VBA / Excel Pin
BeeBar24-Feb-04 7:01
sussBeeBar24-Feb-04 7:01 
GeneralAdd image to database Pin
Amirjalaly24-Feb-04 4:24
Amirjalaly24-Feb-04 4:24 
GeneralRe: Add image to database Pin
Judah Gabriel Himango24-Feb-04 4:53
sponsorJudah Gabriel Himango24-Feb-04 4:53 
GeneralRe: Add image to database Pin
Mazdak24-Feb-04 5:19
Mazdak24-Feb-04 5:19 
GeneralRe: Add image to database Pin
Heath Stewart24-Feb-04 5:23
protectorHeath Stewart24-Feb-04 5:23 
GeneralRe: Add image to database Pin
turbochimp25-Feb-04 10:58
turbochimp25-Feb-04 10:58 
Generalmusic files Pin
jphuphilly24-Feb-04 4:22
jphuphilly24-Feb-04 4:22 
GeneralRe: music files Pin
Mazdak24-Feb-04 5:23
Mazdak24-Feb-04 5:23 
GeneralRe: music files Pin
jphuphilly24-Feb-04 7:03
jphuphilly24-Feb-04 7:03 
GeneralCrystal Report batch console application Pin
Visionsoft24-Feb-04 3:53
Visionsoft24-Feb-04 3:53 
GeneralSorting DataGrid BoundColumn using DataGrid.SortCommand Pin
ajaylulia24-Feb-04 2:21
ajaylulia24-Feb-04 2:21 
GeneralRe: Sorting DataGrid BoundColumn using DataGrid.SortCommand Pin
Mazdak24-Feb-04 3:21
Mazdak24-Feb-04 3:21 
GeneralRe: Sorting DataGrid BoundColumn using DataGrid.SortCommand Pin
ajaylulia24-Feb-04 16:56
ajaylulia24-Feb-04 16:56 
GeneralAsynchronous sockets and message queues Pin
Rickard Andersson2024-Feb-04 2:08
Rickard Andersson2024-Feb-04 2:08 
GeneralRe: Windows Processes& Properties Pin
Heath Stewart24-Feb-04 5:05
protectorHeath Stewart24-Feb-04 5:05 
GeneralError: Malformed server response Pin
rosie224-Feb-04 0:33
rosie224-Feb-04 0:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.