Solved

How to create an ActiveX DLL using Microsoft Visual Basic 2010 Express?

Posted on 2010-11-12
8
2,035 Views
Last Modified: 2012-05-10
How do I create an "ActiveX DLL" from VB source in  "Microsoft Visual Basic 2010 Express"?
If this cannot be done, what is the easiest and simplest way do do this?  I have an Excel Visual Basic Component add-in I need to compile to create an ActiveX DLL of it.  I would prefer not to have to purchase any software, and Visual Basic 2010 Express is free.  However if I must buy something, what is the mimimum cost product I would have to buy that is needed to do this?
Thank you.
0
Comment
Question by:toddvoros
  • 3
  • 3
8 Comments
 
LVL 70

Assisted Solution

by:Éric Moreau
Éric Moreau earned 500 total points
ID: 34125500
VB.Net cannot create a real ActiveX. If that's what you want, you better use VB6.
0
 

Author Comment

by:toddvoros
ID: 34125625
What exactly do I need to purchase?  Or is there a freeware copy of VB 6 available?
My concern is that Microsoft has stated that VB 6 is no longer supported.
So if I had to buy something, would I be wasting my money? Thank you.
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 34125689
It is true that VB6 is no longer supported.

What do you want to do exactly?

If you want to create an add-in, you do not have to create an ActiveX. Check http://www.emoreau.com/Entries/Articles/2010/06/Creating-Excel-Add-in-with-VBnet-or-C.aspx (but I am not convinced that it is working with Express).
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:toddvoros
ID: 34133445
emoreau: I want to be able to compile and link this add-in code for Excel:

From http://www.cpearson.com/Excel/CreatingCOMAddIn.aspx
see this commentary.  It says the CAI must be an ActiveX but
if you know how to make it work without it being ActiveX please let me know.

Performance -- A CAI is an ActiveX DLL that is compiled into native machine code. A CAI runs considerably faster than the interpreted code of VBA.

Example COM Add In

To understand how to write and deploy a COM Add In, we will build a simple CAI that has the following features:

•Support For Excel and PowerPoint, versions 2003 and 2007.
•Trap Application Events for both Excel and PowerPoint.
•Several function library classes with functions that can be called directly from worksheet cells (not applicable to the PowerPoint implementation).
•A structure that allows functions in the library classes to be called from VBA code.
The CAI won't actually do much, but will illustrate nearly everything you need to learn about COM Add Ins. It will create an item on the Tools menu in both Excel and PowerPoint that displays a "Hello World" message box. It will also include two classes, Multiplication and Division, that will contain functions that can be called directly from worksheet cells (Excel only, of course). The object model will also be structured so that you can reference the CAI's classes and call their functions from within your VBA code.

End of description.  Still need the best and least expensive way to compile and link this example, freeware would be highly desirable, or minimum possible cost if something has to be purchased. If so, what exactly do I need to purchase, and where do I get it from?  Thank you.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 34135067
have you check my article? it shows how to create a add-in for Excel in .net. the only thing I am not sure is if it will work in Express. try to download the code, compile it, and load it in Excel.
0
 

Author Comment

by:toddvoros
ID: 34920684
Thanks, this project is on hold but will be restarted 2Q11.  So closing this is OK for now.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 34949756
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question