Solved

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

Posted on 2010-11-12
8
2,004 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

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 142

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
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…
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…

774 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