MS Office Forum / Excel / Programming / May 2008
from VBA to DLL VB6 for security's sake:recommendations sought
|
|
Thread rating:  |
Matthew Dodds - 23 May 2008 22:58 GMT I've used VBA code to automate various Excel data analyses and charting. For code security's sake I'd like to transfer most of this functionality into DLLs. (And, to be honest, as an exercise for learning VB6 - yes I know VB6 is now unsupported and we're all supposed to be seguing to .NET but frankly where I work we'll transfer to .NET no time soon)
Question is - where to start? Right now my my VBA coding is functional & I've got Paul Lomax's 'VB and VBA in a Nutshell'.
What would everyone's recommendations be on - other books? Visual Basic 6 Core Language Little Black Book: The Indispensable Guide of Day-to-Day VB6 Programming Tips and Techniques (Paperback) by Steven Holzner (Author) is one that has caught my eye, As has Code Complete: A Practical Handbook of Software Construction (Paperback) by Steve McConnell (Author) 900 pages $26 ... a little ambitious, perhaps, but learning about good design structure presumably no bad thing.
- software; Enterprise edition of VB6? or Visual studio? Which would be best? why?
- and has anyone some recommendations for neat tutorials out there? I've digested ChipPearson's 'Creating a COM Addin', and the ms pages http://support.microsoft.com/kb/238228 & http://support.microsoft.com/?id=291392; needless to say ChIP's was the most comprehensible. Are there any sites for taking this further?
Many thanks in advance
Matthew
Doug Glancy - 24 May 2008 00:01 GMT Matthew,
You should take a look at Professional Excel Development. It has good content on calling VB6 dlls from Excel:
http://www.amazon.com/Professional-Excel-Development-Applications-Addison-Wesley /dp/0321262506
Once you've got the mechanics of that down, it's not much different from coding VBA.
hth,
Doug
> I've used VBA code to automate various Excel data analyses and > charting. For code security's sake I'd like to transfer most of this [quoted text clipped - 29 lines] > > Matthew Jon Peltier - 24 May 2008 01:27 GMT I was going to suggest this book. It's the best Excel development book there is.
- Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______
> Matthew, > [quoted text clipped - 42 lines] >> >> Matthew Bob Phillips - 24 May 2008 00:14 GMT I've got a little example VB6 DLL that is invoked from Excel. It is the full package, VB6 code, an executable, and an Excel test harness. If you would like, I can send you a copy. Is that a valid email?
 Signature --- HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
> I've used VBA code to automate various Excel data analyses and > charting. For code security's sake I'd like to transfer most of this [quoted text clipped - 29 lines] > > Matthew Matthew Dodds - 24 May 2008 12:27 GMT > I've got a little example VB6 DLL that is invoked from Excel. It is the full > package, VB6 code, an executable, and an Excel test harness. If you would [quoted text clipped - 45 lines] > > > Matthew Not for the first time I think praise be to this newsgroup; thank you Doug, Jon, Bob for your responses. I should have known to look out for the book you recommended; I have their Excel 2000/Excel 2002 VBA Programmer's Reference (Wrox Press) and it's the most well thumbed book in the house.
Bob, yes that's a real email, and thank you for your kind offer - I suspect I'm not yet able to make good use of it, but please yes, that would be very helpful. What does it do? I'd like to be able to view the code so I can understand better - hope that can be possible, once I sort out the software-to-buy issue. Thank you.
My remaining unaddressed issue (besides trivial matter of the VB6 learning curve, lol) is software package availability, versions and recommendations; I'm a bit at sea as to what distinguishes the various editions - can anyone offer a quick precis & recommendation? I want to be able first and foremost to write in-process DLLS for Excel, to create installation packages (if that's the right terminology) so their distribution is idiot proof, and to be able to release time- limited versions so they go dead after a trial period. (I've just come across "Microsoft Visual Basic Enterprise Edition - ( v. 6.0 ) - media - CD - Win - English." at less than £30 - shurely shome mistake?))
What would the group recommend?
Thanks in advance for your contributions, and enjoy the weekend. Matthew
Bob Phillips - 24 May 2008 17:58 GMT You can view the code even before you get VB6, the class file is just a text file. The code is amazingly simple, meant to show the technique, not to provide product. Here is an extract from the Readme file that tells what it does
______________________________________________________________________ This VB project is a simple demonstration of a VB6 DLL Function Library that can be used within other applications.
This project consists of one simple function, 'SheetExists', which returns True or False if the nominated worksheet exists. Although a function library can in principle be used within many applications, this function is only relevant to Excel. ______________________________________________________________________
I'll put it in the mail now.
As to the software, at £30 I would get the VB6. It is cheap, but it is unsupported now, so it is not so surprising.
On 24 May, 00:14, "Bob Phillips" <bob....@somewhere.com> wrote:
> I've got a little example VB6 DLL that is invoked from Excel. It is the > full [quoted text clipped - 47 lines] > > > Matthew Not for the first time I think praise be to this newsgroup; thank you Doug, Jon, Bob for your responses. I should have known to look out for the book you recommended; I have their Excel 2000/Excel 2002 VBA Programmer's Reference (Wrox Press) and it's the most well thumbed book in the house.
Bob, yes that's a real email, and thank you for your kind offer - I suspect I'm not yet able to make good use of it, but please yes, that would be very helpful. What does it do? I'd like to be able to view the code so I can understand better - hope that can be possible, once I sort out the software-to-buy issue. Thank you.
My remaining unaddressed issue (besides trivial matter of the VB6 learning curve, lol) is software package availability, versions and recommendations; I'm a bit at sea as to what distinguishes the various editions - can anyone offer a quick precis & recommendation? I want to be able first and foremost to write in-process DLLS for Excel, to create installation packages (if that's the right terminology) so their distribution is idiot proof, and to be able to release time- limited versions so they go dead after a trial period. (I've just come across "Microsoft Visual Basic Enterprise Edition - ( v. 6.0 ) - media - CD - Win - English." at less than £30 - shurely shome mistake?))
What would the group recommend?
Thanks in advance for your contributions, and enjoy the weekend. Matthew
Doug Glancy - 24 May 2008 19:01 GMT Bob,
In terms of pricing, my experience was that because it's no longer in production, it's rare and usually goes for at least a couple of hundred (£100, I think). But that was a few years back, so maybe it's cheaper now.
Doug
> You can view the code even before you get VB6, the class file is just a > text file. The code is amazingly simple, meant to show the technique, not [quoted text clipped - 98 lines] > Thanks in advance for your contributions, and enjoy the weekend. > Matthew Bob Phillips - 25 May 2008 11:16 GMT You may be right Doug, I have never to purchase it that way, I bought mine many years ago. I just applied what seemed feasible logic to me (I almost said common sense, but if you are right, it's not that common <G>).
 Signature --- HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
> Bob, > [quoted text clipped - 108 lines] >> Thanks in advance for your contributions, and enjoy the weekend. >> Matthew Doug Glancy - 25 May 2008 16:38 GMT Bob,
Just keep that license number backed up!
Doug
> You may be right Doug, I have never to purchase it that way, I bought mine > many years ago. I just applied what seemed feasible logic to me (I almost [quoted text clipped - 114 lines] >>> Thanks in advance for your contributions, and enjoy the weekend. >>> Matthew Doug Glancy - 24 May 2008 17:58 GMT Matthew,
I'm not positive, but I'd think you'd be fine with the professional version. The price you quote is too good to be true, or at least legal. I suspect you'd send off your money with no return, but I'm not sure how these super-cheap software vendors work.
I'm sorry I'm not more help, but since you're not getting other answers, thought at I'd at least try.
Doug
On 24 May, 00:14, "Bob Phillips" <bob....@somewhere.com> wrote:
> I've got a little example VB6 DLL that is invoked from Excel. It is the > full [quoted text clipped - 47 lines] > > > Matthew Not for the first time I think praise be to this newsgroup; thank you Doug, Jon, Bob for your responses. I should have known to look out for the book you recommended; I have their Excel 2000/Excel 2002 VBA Programmer's Reference (Wrox Press) and it's the most well thumbed book in the house.
Bob, yes that's a real email, and thank you for your kind offer - I suspect I'm not yet able to make good use of it, but please yes, that would be very helpful. What does it do? I'd like to be able to view the code so I can understand better - hope that can be possible, once I sort out the software-to-buy issue. Thank you.
My remaining unaddressed issue (besides trivial matter of the VB6 learning curve, lol) is software package availability, versions and recommendations; I'm a bit at sea as to what distinguishes the various editions - can anyone offer a quick precis & recommendation? I want to be able first and foremost to write in-process DLLS for Excel, to create installation packages (if that's the right terminology) so their distribution is idiot proof, and to be able to release time- limited versions so they go dead after a trial period. (I've just come across "Microsoft Visual Basic Enterprise Edition - ( v. 6.0 ) - media - CD - Win - English." at less than £30 - shurely shome mistake?))
What would the group recommend?
Thanks in advance for your contributions, and enjoy the weekend. Matthew
Howard Kaikow - 24 May 2008 21:12 GMT Start with Gary Cornell's Visual Basic 6 from the Ground UP. As an experienced VBA programmer, you'll pick things up quickly
Also, get O'Reillly's Visual Basic Controls in a Nutshell.
|
|
|