Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4542582
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T15:24:40+00:00 2026-05-21T15:24:40+00:00

I am trying to build an object library which can be registered and used

  • 0

I am trying to build an object library which can be registered and used from VBA using 64 bit excel 2010. I am using Dev Studio 2008. I think this is a 64 bit issue as I am pretty sure this worked when I tried it with with my previous version of Excel (XP). I have clicked “Make COM visible” in the Assembly info Information dialog and “Register for COM interop” in the build tag. When I set the target type to x64 I can’t see the library in the references dialog at all. I if I select Any CPU I can register it but I get a “Can’t create Active X object” error when I try to instantiate it.

namespace Tester
{
    [Guid("D6F88E95-8A27-4ae6-B6DE-0542A0FC7039")]
    [InterfaceType(ComInterfaceType.InterfaceIsDual)]
    public interface _Numbers
    {       
        int GetDay();
        int GetMonth();
        int GetYear();
        int DayOfYear();
    }

    [Guid("13FE32AD-4BF8-495f-AB4D-6C61BD463EA4")]
    [ClassInterface(ClassInterfaceType.None)]
    [ProgId("Tester.Numbers")]
    public class Numbers : _Numbers
    {
        public Numbers(){}

        public int GetDay()
        {
            return(DateTime.Today.Day);
        }

        public int GetMonth()
        {
            return(DateTime.Today.Month);
        }

        public int GetYear()
        {
            return(DateTime.Today.Year);
        }

        public int DayOfYear()
        {
            return(DateTime.Now.DayOfYear);
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T15:24:41+00:00Added an answer on May 21, 2026 at 3:24 pm

    Since Visual Studio is a 32-bit process, it will erroneously run the 32-bit version of regasm.exe in order to register your 64-bit assembly. Of course, that version of regasm.exe will write to the 32-bit portion of the registry, so that won’t work.

    One way to solve the problem would be to run the 64-bit version of regasm.exe on the target assembly yourself (e.g. in a post-build step). You’ll need to export its type library using the /tlb option, and you’ll also need to pass the /codebase option since the assembly doesn’t reside in the GAC:

    "%SystemRoot%\Microsoft.NET\Framework64\v2.0.50727\regasm.exe"
        /tlb /codebase "$(TargetPath)"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying build a method which returns the shortest path from one node to
I am trying to build a library of silverlight controls where the client can
I am trying to build an object through an attribute on a classes property
I'm somewhat new to object oriented programming in Javascript and I'm trying to build
I'm trying to understand how to build a JSON object in JavaScript. This JSON
Trying to build a GUI application in Java/Swing. I'm mainly used to painting GUIs
Im trying to build call to action button on my site using jQuery. I
I am trying to create python bindings to a vala library using the following
I'm trying to compile a small OpenCV program using Eclipse. I'm limited in library
I am trying to build a small application in C# which should start/stop an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.