Arthur Fuller
fuller.artful at gmail.com
Tue Jul 5 15:28:14 CDT 2011
I may have asked this before; if so, please forgive the redundancy. I've got an old app that I'm sprucing up with A2K7 to run on Windows 7. Some code I lifted from the ADH musketeers no longer works. It seems that the CommonDlg thingie has vanished. I need essentially that functionality, but that works in A2K7 and A2K10: It opens the Windows Open/Save dialog with a bunch of arguments: <vba> Public Function adhCommonFileOpenSave( _ Optional ByRef Flags As adhFileOpenConstants = 0, _ Optional ByVal Filter As String = "", _ Optional ByVal FilterIndex As Long = 1, _ Optional ByVal DefaultExt As String = "", _ Optional ByVal FileName As String = "", _ Optional ByVal DialogTitle As String = "", _ Optional ByVal InitDir As String = "", _ Optional ByVal hwndOwner As Long = 0, _ Optional ByVal OpenFile As Boolean = True) As String </vba> In a couple of places in the app, I need to ask the user for the directory in which to save this file, or alternatively, the directory to associate with the selected Customer and|or Project. Any suggestions or code to do this? I want to attach it to a button and have the dialog open on the the specified initial directory, then allow creation of a new subdir beneath that, and ultimately return the final directory name. TIA, Arthur