I ripped this from www.vbaccelerator.com. It's quite old code, but works very well. It's all API, and you can use the Common Dialogs all from within your code, also easy to use in modules and classes. It follows the way of displaying in the different versions of Windows, looks normal in Win98 and fancy in WinXP.
I've used it in several projects, below how to use:
VB Code:
Dim cDiag As cCommonDialog Set cDiag = New cCommonDialog 'Open a file not using the commondialog in VB, but completely via code (to find on internet) With cDiag .DialogTitle = "Open ARM.mdb.." .flags = OFN_FILEMUSTEXIST Or OFN_PATHMUSTEXIST .InitDir = App.path .Filter = "Access databases (*.mdb)|*.mdb" .FilterIndex = 1 '.HookDialog = True .ShowOpen End With




Reply With Quote