Hi All;
I put the On Error Statment and write the error handling but the error still apeare when I click the cancel button in the common dialouge box. This is my code for this.
Private Sub Command1_Click()
On Error GoTo ErrorHandler
CommonDialouge1.CancelError = True
CommonDialouge1.DialogTitle = "Save Playlist File"
CommonDialouge1.Filter = "All Files (*.*)|*.*|Text (*.txt)|*.txt"
CommonDialouge1.FilterIndex = 2
CommonDialouge1.flags = cdlOFNExplorer Or cdlOFNLongNames Or cdlOFNPathMustExist Or cdlOFNHideReadOnly
CommonDialouge1.FileName = ""
CommonDialouge1.ShowSave
If Trim(CommonDialouge1.FileName) = "" Then
Exit Sub
End If
ErrorHandler:
Select Case Err.Number
Case cdlCancel
CommonDialouge1.FileName=""
Resume Next
End Select
End Sub
