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. |