Solved

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

Posted on 2010-11-12
8
1,967 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 69

Assisted Solution

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

Author Comment

by:toddvoros
Comment Utility
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 69

Accepted Solution

by:
Éric Moreau earned 500 total points
Comment Utility
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

Author Comment

by:toddvoros
Comment Utility
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 69

Expert Comment

by:Éric Moreau
Comment Utility
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
Comment Utility
Thanks, this project is on hold but will be restarted 2Q11.  So closing this is OK for now.
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now