shiva.sk


Hi,

I am working with VBA in Bentley Microstation 8.0. I wanted to know whether there is a way to implement the DirListBox and FileListBox (that are present by default in VB 6.0 toolbox) in VBA forms

I think people from the VBA team in Microsoft can only answer this. Any help from any corner would be great.

Regards,

shiva




Re: How to implement DirListBox and FileListBox in VBA forms?

Andy Pope


Hi,

I don't believe you can incorporate those VB controls directly into VBA.
You would need to create your own version of the controls using a something like the FileScriptingObject to return drives and folder structure.

If you just want to allow the user to select a folder location in which to save or read data from then maybe you can use

Application.GetOpenFilename.

or

Application.FileDialog(msoFileDialogFolderPicker).Show







Re: How to implement DirListBox and FileListBox in VBA forms?

Shasur

Hi Shiva

MyDialog = Application.Dialogs(xlDialogOpen).Show

Should get you the dialog

Or Try using the Shell Function to get the folder http://vbadud.blogspot.com/2007/04/browse-folder-select-folder-thru-shell.html

Cheers

Shasur