VB Code:
If opt_txt.Value = True Then CommonDialog1.DialogTitle = "Save Log File" CommonDialog1.Flags = cdlOFNHideReadOnly CommonDialog1.Filter = "Text Files (*.txt)|*.txt|" CommonDialog1.FilterIndex = 1 CommonDialog1.ShowSave file_inidir = "C:\Program Files\FYP System\Log File\" & user_reg.txt_username CommonDialog1.InitDir = file_inidir If CommonDialog1.FileName = "" Then Timer1.Enabled = False Exit Sub Else show_dir = CommonDialog1.FileName End If end if
when i choose the CANCEL button, suppose it do not do anything.....
but it still save the data into a file!!!
so, how to settle this problem?




Reply With Quote