[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.
Tip 2263: Use VBA for Input from Visual LISP
Tip# 2263 By Bill Kramer On 01-Dec-2007
Rated By 1 users Downloaded : 391
Categories : VBA Code Modules
Software type : AutoCAD
LISPBROWSEFOLDER.BAS and BROWSEFOLDER.LSP used with Tips 2261-2262: Visual LISP code calls up and exchanges data via VBA and invokes a VBA macro.

Tip 2263: Use VBA for Input from Visual LISP
Incorporating the code files LISPBROWSEFOLDER.BAS and BROWSEFOLDER.LSP in addition to code from two tips above, this tip allows Visual LISP to call up the VBA Browse Folder dialog box (Pick a Folder Dialog Box) by passing a title to VBA (Use VBA for Input from Visual LISP) and receiving the folder name as a string back from VBA (also Use VBA for Input from Visual LISP). Between sending the string to VBA and getting the result, the Visual LISP code invokes the VBA macro, then waits for a sign that the VBA macro has finished. The sign is a changed value in the UserI1 system variable. When that value is changed (by the VBA macro), Visual LISP knows that an answer is ready for pickup. Calling the function (BrowseFolder prompt) will bring up the VBA folder browser then return the selection made. If nothing is selected, a blank string is returned.



Average Rating:

User comments

Log In