Save files in excel, which replace previous ones

My application requires creating a new normal excel workbook. For which I am using these options to save it:

opcion1
opcion2

And also implementing the steps mentioned in the manual to save normal Excel files:
XLSPadlock.setOption Option:=“2”, Value:=“0”
XLSPadlock.setOption Option:=“1”, Value:=“1”
and
XLSPadlock.setOption Option:=“2”, Value:=“1”
XLSPadlock.setOption Option:=“1”, Value:=“0”

The application requests a name that the user must provide to save the book and also suggests a default name, it works well with the mentioned options.
But when you want to give the same name to a previously generated file, an error appears.
image

I have tried to create a routine that deletes files that have the name I provide but it does not work, using the vba kill statement and other options. I also included the usage of application.displayalerts=false

What can I do in order that the user would be able to create new files using names that are already created or how to achive that the application replace an old file for a new one using the same name.

Where in your code are you saving the workbook file unprotected?
For instance, with:

XLSPadlock.SetOption Option:=“1”, Value:=“1”

wkb.SaveAs “C:\My Documents\WorkbookName.xls”
XLSPadlock.SetOption Option:=“1”, Value:=“0”

I used the implementetion like in your example:

What is the value of strRutaDestino?