I'm stumped at "add a module..." so I'm starting to study VBA. Is it going to be fun? Is there a book you would recommend?
See the attached
ApiUtils.zip file (contains ApiUtils.dvb), perhaps it will help. Open it via
Tools -> Macro -> Load Project and then open the VBA IDE via
Tools -> Macro -> Visual Basic Editor or type
VBAMAN at the AutoCAD command line, load it up using the
[Load ...] button, and then open the VBA IDE by hitting the
[Visual Basic Editor] button.
I think it's fun but I'm weird that way. As for books, eek, I must have 30 on VB alone, though none of them are AutoCAD centric. Hmmm, perhaps
Programming Visual BASIC 6.0, by Francesco Balena (don't know if it's still in print) as a first. It's well written and sports good info that is still usable today, including ADO, API calls etc. despite being kinda long in the tooth at 8 years old. Case in point, page 1203 discusses the API call I used below, even tho I initially started out by perusing some of my other books when starting this exercise.
Having said all that, if you're just starting out learning VB(A) I'd probably recommend you go VB.NET or C# instead. VB(A) has served me very well for a very long time but it's considered antiquated now by most.