I did make it work by by the steps on this page. It works quite nicely. The
only way I can access the dll is start the
vb editor and quit then everything
works fine.
Here is the page that I got it to work with. There are somethnings still you
have to do in order to be able to pass strings to and from the dll. I can
compile the dll straight from vba. This is great I just need this little
thing to work and everythting would be great.
http://www.vb-helper.com/howto_make_standard_dll.html
"Peter T" wrote:
I've seen that example and couldn't make it work. Perhaps I didn't get it
right but I recall comments from others who couldn't either.
It's certainly not the normal way of doing things, to quote from the
article -
"
Certainly it's true that out of the box, Visual Basic doesn't allow you to
create a Windows DLL in the same way that you can create other project
types, like a Standard EXE or an ActiveX DLL. In this article, we'll go
exploring to see how Visual Basic generates its executables. In the process,
we'll discover that with a little bit of extra work, we can in fact create
Windows DLLs with Visual Basic.
"
The normal way of course is with an ActiveX dll created in VB (not VBA) and
used along the lines suggested by Chip Pearson earlier in this thread, and
if using Early Binding with a reference set in Tools. A C# dll or xll of
course is different.
Regards,
Peter T
"Paul" wrote in message
...
I did exactly that. I used that as a template for what I want to do. My
problem is that I can't seem to execute/run the dll code after excel is
loaded. Excel closes unexpectlfy when I try to access sub/functions in the
dll.
"NickHK" wrote:
Paul,
Unless you followed the steps on
http://www.windowsdevcenter.com/pub/...reate_dll.html
what you have is an ActiveX dll.
NickHK
"Paul" wrote in message
...
why not? I think I did.
"Chip Pearson" wrote:
No.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"AA2e72E" wrote in message
...
"Chip Pearson" wrote:
"You can't create Windows DLLs in VB or VBA. You can only
create ActiveX
DLLs. "
Can you create ActiveX DLLs in VBA?