IonicWind Software

IWBasic => General Questions => Topic started by: EvangelMike on February 27, 2009, 09:14:00 PM

Title: Creating dll for Excel following steps listed in Professional Excel Development
Post by: EvangelMike on February 27, 2009, 09:14:00 PM
Greetings! Having been a computer programmer since 1963 (but only using VBA since 2004, and brand new in Basic), I have learned by long and bitter experience that often the best way to solve a problem, is to follow the instructions ever more closely and exactly. In this case I am trying to create a dll which can be used in Excel (either 2003 or 2007). The exact instructions to do this with VB 6 from "Professional Excel Development" by Bullen, Bovey, and Green (pages 687 - 693) are:

Open VB 6 and do the following:

1. Select ActiveX DLL Project Type.
2. Click Open, and VB 6 creates a new ActiveX Project.
   In VB 6, an ActiveX DLL consists of two parts: a Project and a Class Module.
3. Name the project "AFirstDLLProject."
4. Name the class module "CHelloWorld", and then save the project.
5. Open the class module and add the following code:

Public Sub ShowMessage()
   MsgBox "Hello World!"
End Sub

6. Using the File Menu, Select File > Make AFirstDLLProject.dll
7. In the directory in which the project was saved will now be found the file AFirstDLLProject.dll.
   This is the compiled executable form of all the files in the project combined.

Is there any way to exactly do this (or its exact equivalent) using Emergence Basic instead of VB 6?
Thank you very much in advance for your help and suggestions. May you have a blessed weekend.

Sincerely,

Michael D Fitzpatrick
Title: Re: Creating dll for Excel following steps listed in Professional Excel Development
Post by: LarryMc on February 27, 2009, 09:27:06 PM
As far as I know EBasic doesn't create ACTIVEX dlls.

Larry
Title: Re: Creating dll for Excel following steps listed in Professional Excel Developm
Post by: Ionic Wind Support Team on February 27, 2009, 09:36:08 PM
Nope.  It creates standard Windows DLL's as I have already stated.

And the link I gave you shows you how to use a standard Windows DLL in Excel.  You just need to use the information provided.

Emergence BASIC is not VB, nor should you assume that all BASIC type languages are the same.

Paul.
Title: Re: Creating dll for Excel following steps listed in Professional Excel Developm
Post by: Ionic Wind Support Team on February 27, 2009, 09:38:11 PM
Just to be clear.  Using an Emergence created DLL in Excel is the same as using a C created DLL in Excel.  So if you follow those Microsoft instructions you should be able to accomplish your goals.