szakharov7723
Board Regular
- Joined
- Jun 22, 2018
- Messages
- 85
- Office Version
- 2019
- Platform
- Windows
So currently my code has vbQuestion & vbYesNoCancel. I am trying to figure out if I can replace Yes No Cancel with my own options. Preferably (not necessarily) without editing code too much.
Code:
If Dir(FPath & "\" & FName & FExt) <> "" Then
wAns = MsgBox("The file already exists. Do You want to replace it", vbQuestion & vbYesNoCancel, "Save Copy")
Select Case wAns
Case vbYes
Application.DisplayAlerts = False
ThisWorkbook.Save
Application.DisplayAlerts = True
Case vbNo
Application.DisplayAlerts = False
ThisWorkbook.SaveAs Filename:=FPath & FName & "_2" & FExt
Application.DisplayAlerts = True
Case vbCancel
MsgBox "Process canceled"
End Select