Saving Text using the CommonDialog control:   Return to List

' First add a CommonDialog control to the project and name it CommDlg1
With CommDlg1
    .FileName = ""
    .Filter = aFilter
    .InitDir = aPath
    .Flags = &H2&
    .ShowSave
    If .FileName <> "" Then
        Open AObject.FileName For Output As #aFileNum
        Print #aFileNum, aFile' the aFile variable contains the text we're saving
        Close #aFileNum
        OpenSaveFiles = "Success"
        GoTo ImDone
    End If
End With



Note to Webmaster