Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.visual.basic    |    MS Visual Basic discussions, NOT dot-net    |    10,840 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 8,877 of 10,840    |
|    Randy Birch to Gord    |
|    Re: Response to overwrite prompt?    |
|    11 Oct 04 23:06:48    |
      From: rgb_removethis@mvps.org              You don't. If the user selects no, they are returned to the dialog for       another selection or to cancel the action. You can determine if cancel was       selected by setting the CancelError property to true, and adding error       trapping which will fire if cancel is selected. E.g. ..              Private Sub Command1_Click()               On Error Goto save_error               With CommonDialog1        .CancelError = True        .Flags = cdlOFNExplorer Or cdlOFNFileMustExist Or cdlOFNLongNames        .Filter = "*.bmp|*.bmp"        .ShowSave               If Len(.FileName) > 0 Then        'do something with .FileName        End If               End With              save_exit:        Exit Sub              save_error:        '        Resume save_exit              End Sub                     --                     Randy Birch       MS MVP Visual Basic       http://vbnet.mvps.org/                     "Gord" |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca