Solved

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

Posted on 2010-11-12
8
2,073 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

733 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