[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 2261: Pick a Folder Dialog Box
Tip# 2261 By Bill Kramer On 01-Dec-2007
Rated By 1 users Downloaded : 859
Categories : LISP Code Modules, VBA Code Modules
Software type : AutoCAD
Rename File To : Tip 2261: BROWSEFOLDER.BAS
BROWSEFOLDER.BAS: This code module can be integrated into VBA routines to present a dialog box that prompts the user to select a folder.

Tip 2261: Pick a Folder Dialog Box
VBA is a programming language you can use to customize a variety of software solutions in addition to AutoCAD -- primarily Microsoft Office products such as Word, Excel, Outlook, and Access. Not surprisingly, VBAcomes with a host of interesting features that have nothing to do with AutoCAD. Communicating with the operating system and using features shared by other applications is something that occasionally yields some valuable treasure. This tip presents a dialog box that prompts the user to select a folder. Although the common file dialog box could be used for this purpose, another option is available inside the basic tools of Windows. The module file BROWSEFOLDER.BAS contains the code needed to display the folder dialog box inside VBA. Inside your VBA code, you will now have a function named BrowseFolder that will return a string of the folder name selected. As noted, this function is used in the previous tip, Process All Drawings in a Folder, to select a folder to process (and as an example). Other systems functions inside of Windows also may be of interest. You can learn more about these tools on the Microsoft Developer Network (MSDN) Web site, or you can often find exactly what you need through a general Internet search or by asking fellow users at the Cadalyst Hot Tip Harry Discussion Forums.



Average Rating:

User comments