mdlDialog_fileCreate
mdlDialog_fileOpen
Maybe I'm just usin it wrong. Here's some of my code.
Public Function CreateReportFile(ByRef ReportName As String) As Boolean 'RETURNS TRUE IF SUCCESSFUL CreateReportFile = False 'CREATE DEFAULT FILENAME Dim DefaultFilename As String DefaultFilename = "C:\report" & Lot_Closure_File_Extension 'GET CURRENT LOT FILE NAME Dim FullFilename As String FullFilename = GetSetting(Appname_Survmac, Section_Lot_Closure, Key_Filename, DefaultFilename) 'GET SUGGESTED FILENAME FOR REPORT FILE Dim xSplit2 As Variant xSplit2 = Split(FullFilename, "\") Dim TheLotFilename As String TheLotFilename = xSplit2(UBound(xSplit2)) Dim PeriodPosition As Long PeriodPosition = InStrRev(TheLotFilename, ".") Dim SuggestedFilename As String If PeriodPosition > 0 Then TheLotFilename = Left(TheLotFilename, PeriodPosition - 1) End If SuggestedFilename = TheLotFilename & Lot_Closure_Report_File_Extension 'GET SUGGESTED PATH FOR REPORT FILE xSplit2(UBound(xSplit2)) = "" Dim NewTextFilePath As String NewTextFilePath = Join(xSplit2, "\") 'CREATE FILTER STRING Dim FilterString As String FilterString = "*" & Lot_Closure_Report_File_Extension 'CALL COMMON DIALOG FOR CREATING FILE Dim retVal As Long Dim lngfhandle As Long Dim lngrid As Long Dim strFName As String strFName = Space(255) retVal = mdlDialog_fileCreate(strFName, lngfhandle, lngrid, SuggestedFilename, FilterString, NewTextFilePath, "Create Report File") Select Case retVal Case 0 'Open 'RETURN NEW REPORT FILENAME strFName = Left(strFName, InStr(1, strFName, Chr(0)) - 1) ReportName = strFName CreateReportFile = True Case 1 'Cancel 'MsgBox "No File Selected." 'User hit the Cancel Button End Select End Function