Questions similar to this appear on VBA developer newsgroups such as the Code Project, as well as the Be Communities MicroStation Programming Forum.
Q How do I let my VB application's users find a folder?
A
Windows has a folder browser dialog, but it's well hidden inside the Win32 API.
There's no explicit VB class or control that provides a folder browser.
Also, it's difficult to use the Win32 API browser from a VBA project because it uses some incomprehensible parts of the API.
Our FolderBrowser ActiveX component provides a simple solution.
Its interface presents a set of simple properties and a single method, Browse
, that are easy to use in VBA.
The Browse
method pops a standard Windows folder browser dialog.
FolderBrowser is designed for VBA users. If you're writing .NET applications using VB.NET or C# then you have no need of FolderBrowser, because Microsoft rectified their omission.
FolderBrowser is designed for VBA users, and VB6 users if you go back that far. If you're writing a Visual C++ application then you have no need of FolderBrowser. You can use the Windows Shell API directly.
FolderBrowser is designed for VBA users. The code and the installation is showing its age. You may find that installation fails with Windows 7.
If you see an install error when using Windows 7, you can attempt to install the ActiveX manually. Take these steps …
FolderBrowser.dll
from the ZIP file to C:\Program Files\LA Solutions\bin
regsvr32 FolderBrowser
FolderBrowser.dll
from the ZIP file to C:\Program Files (x86)\LA Solutions\bin
C:\Windows\SysWOW64\regsvr32 FolderBrowser
For more information about COM registration and the Windows utility regsvr32, visit Microsoft's web site.
Q How do I let my MicroStation® VBA application's users browse for a folder specified by a MicroStation configuration variable?
A Our FolderBrowser ActiveX component provides a simple solution for MicroStation VBA developers. We've provided an example MicroStation VBA class that wraps the FolderBrowser and adds a further property to set a MicroStation configuration variable (CfgVar). The MicroStation VBA folder browser class is described in the supplied MVBA project.
Q That looks terrific! How do I get hold of FolderBrowser?
A The FolderBrowser ™ ActiveX component is free! LA Solutions grants you a zero-cost license to use the software, provided you don't give or sell it to others. We provide a Windows installation that includes example projects for VB and MicroStation VBA developers.
Complete the FolderBrowser Request Form. You will be directed to a page where you can download the installation.