Create save as XLSPadlock

I am a vba beginner, i want to ask if i use Allow secure save and Do not prompt user for filename when saving, how to make vba code that can open save dialog window when first time save (xlsc), then automatically replace when user save again (without show save dialog window). And save dialog window will open again if user want to save as (xlsc) for different name/location. Sorry for my bad english and thanks very much.

If you enable “Do not prompt user for filename when saving”, then your XLS Padlock compiled workbook won’t create saves itself. You are then responsible for using VBA to save your workbook as a file and encrypt it if you want. Otherwise, changes will be lost.
So it is not recommended to use it, unless you know what you are doing.

Thank for reply. So how to make automatically replace xlsc when user save (without show dialog). On other section i want make button to extract range as a new workbook(use workbook add .xlsx), if user click button will open save as dialog to choose location then saved as xlsx. On compile exe after click save will open dialog again to save as secure file, how to prevent it and still can be save as xlsx. Thanks very much for your support.

You can’t disable the “Save As” dialog box when saving a protected workbook.

For your second point, you can use VBA to save extracted data as a new Excel workbook. In that case, XLS Padlock won’t create secure saves. It only cares about the main protected workbook, not the ones you could create with VBA code.

Thank for reply. I will complete my application first.