Then, the easiest way is to write a MACRO (or just RECORD it). That will give you the VBA source code, which can usually be adapted to VB6 pretty easily.
First, I would like to say thank you for taking time on this. Very generous of you. :-)
Unfortunately, we have not been addressing the problem I am asking about.
In the example code you provided, there are NO REFERENCES to any functions within a .XLL file.
Please understand, I am NOT trying to control Excel from VB6. I do not want to write or read anything from an Excel Worksheet.
What I want to do is to use a .XLL file that contains FUNCTIONS normally used within Excel. I want to use them in VB6, just like if it were a .DLL file.
Stand-alone VB6 app using a function compiled in a XLL file.
I need to know if this is possible, and if so, how?
Again, your code only manipulates Excel worksheets to do this or that, but does NOT use any functions from a XLL file.
Well, if a MACRO were to READ YOUR PARAMETERS, and EXECUTE whenever it was opened, your program would WRITE THE PARAMETERS, and start Excel with the worksheet set to open and execute AUTOSTART
Yes, but I do not want to open Excel, or a spreadsheet.
I do not wish to use Excel at all.
I can use the functions within xlMath.xll in my Excel programs by declaring xlMath.xll within a VBA program.
I only want to use a .XLL function in VB6 to create a Stand-alone VB app.
Public Declare Function XLLFunc Lib "xlMath.xll" (ByVal emb As Integer, ByVal Data As Single, ByVal iFirst As Integer, ByVal iLast As Integer, Optional flgdt As Boolean, Optional flgstd As Boolean)
If it were a DLL, it would be something like the above.
I'm only trying to find out if I can do the same with a XLL, and if so, how.
What kind of functions are we talking about? I assume they are generic with no excel requirement.
I suppose you do not have the code for this xll file right?
An xll is just a dll. If you know the signature of the function you want to call, you can call it just like any other function. If you don't know the signature but can load the add-in in Excel, there is a way to get Excel to tell you the signature.
Automation only works if you are running Excel. There is no need for that once you know the signature.
But yes, I know the signature. I guess that means if I know what parameters it takes and what it returns. This I know.
I don't know if they have Excel requirements. I'm hoping they do not. As you just found, they should be just like DLL's. But I cannot seem to get the DECLARE to work with it like a DLL. So I'm thinking there must be something else to it.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.