ActiveWorkbook.SaveAs saving the workbook unprotected

Hello. When I execute ActiveWorkbook.SaveAs in my code, XLSPadlock saves a secure version of the workbook in the selected location and also saves the workbook unprotected in the “Documents” folder. Is there any way to fix that? Thank you

Is there any reason you need ActiveWorkbook.SaveAs? Do you want to save a plain workbook or a secure workbook file?

I want to save a secure workbook file through a ribbon button that executes VBA code to save. Should I use something else?

Yes, you can use this VBA code to create a secure save file:

And to prompt for a filename, use this VBA code:
Sub DemanderNomFichier()
Dim fd As FileDialog
Dim strNomFichier As String

' Créer une boîte de dialogue pour sélectionner un fichier
Set fd = Application.FileDialog(msoFileDialogFilePicker)

' Personnaliser la boîte de dialogue
With fd
    .Title = "Sélectionnez un fichier"
    .AllowMultiSelect = False
    .Filters.Clear
    .Filters.Add "Tous les fichiers", "*.*"
End With

' Afficher la boîte de dialogue et récupérer le nom de fichier sélectionné
If fd.Show = -1 Then
    strNomFichier = fd.SelectedItems(1)
    MsgBox "Vous avez sélectionné le fichier : " & strNomFichier
Else
    MsgBox "Aucun fichier sélectionné"
End If

' Libérer la mémoire
Set fd = Nothing
End Sub