[Search tip detail and code files using keywords, tip number, author name, etc ]
 
    For tip to function correctly, you must ensure that the downloaded file name matches the file name
    displayed in the Rename File To field. Please rename downloaded files when necessary.
Load and Run VBA Macros Using Straight VBA
Tip# CADCLINIC By Mike Tuersley On 01-Sep-2004
3.5
Rated By 2 users Downloaded : 466
Categories : Programmer's Tools, VBA Code Modules
Software type : AutoCAD
Rename File To : acad.dvb, acad.rx
Two files, ACAD.DVB and ACAD.RX, let you load VBA routines without using AutoLISP.

Welcome back! This month we're going to look at how to automatically load and run VBA macros using straight VBA. The idea for this article came when I noticed the same question repeated over and over again on the newsgroups and realized that most VBA programmers have no idea how to do this. Most assume it requires AutoLISP.
The reality is that the process requires AutoLISP or Visual LISP only if the end user needs a command-line shortcut to a macro. Even then, you don't necessarily need a LISP file, as I'll demonstrate. What the process does require are two files we need to create ACAD.DVB and ACAD.RX. Let's start with the ACAD.DVB file.
First, fire up AutoCAD. Then go into the VBA Manager and create a new file. While in the VBA Manager dialog box, save the new file as ACAD.DVB. Now, open the VBA IDE and start programming.


 

 

Average Rating:
3.5


User comments


Log In