Is it possible to use cdlOFNOverwritePrompt as condition?
To be specific: I wish to let my program act in one way if cdlOFNOverwritePrompt dialog box appears during runtime and another way if it does not.
A simple coding example:
Problem is that the coding activates the if-statement whether or not the cdlOFNOverwritePrompt dialog box appears.
Is there a way around it?
What I am trying to do with this is to make one thing happen if the current file already exists and another if it does not.
To be specific: I wish to let my program act in one way if cdlOFNOverwritePrompt dialog box appears during runtime and another way if it does not.
A simple coding example:
Code:
With CommonDialog1
.Flags = cdlOFNOverwritePrompt
.ShowSave
End With
If cdlOFNOverWritePrompt Then 'Here is where it does not work
MsgBox Prompt:=("OverwritePrompt Dialog Box appeared")
End If
MsgBox Prompt:=("OverWritePrompt Dialog Box did not appear")
Problem is that the coding activates the if-statement whether or not the cdlOFNOverwritePrompt dialog box appears.
Is there a way around it?
What I am trying to do with this is to make one thing happen if the current file already exists and another if it does not.