Hi,
I wrote the save as macro:
However, I noticed that macro is saving files even if there is a file with the same name. How to prevent this and force excel to show the prompt for a file name change?
Kind regards,
dzon_doe
I wrote the save as macro:
VBA Code:
Sub actionSaveFile()
Dim nazwa As String
nazwa = Sheets("Dane").Range("AF1")
sFName = Application.GetSaveAsFilename(InitialFileName:=nazwa, fileFilter:="XLSM (*.xlsm), *.xslm")
If sFName <> False Then
ActiveWorkbook.SaveAs sFName, 52
End If
End Sub
However, I noticed that macro is saving files even if there is a file with the same name. How to prevent this and force excel to show the prompt for a file name change?
Kind regards,
dzon_doe