Macro to save a sheet in CSV format gets prompted to save the entire workbook in xlsc

I have a macro that will copy a sheet and then save it as a CSV format. It uses the Application.GetSaveAsFilename to get the location and file name, then I use the With Activeworkbook .saveas to save the file.

It does save the file just fine in the compiled version, but after it save the file to csv, it will prompt the users to save the local workbook in a secured file format .xlsc. Even if I go along and say to save it, it doesn’t actually seem to update the file with any changes. My preference would be to not have this second “secured” file save be asked at all.

The only security setting that I have enabled is “Allow secure save”

Oops. Didn’t see this thread though the resolution is simple and in the XLS Padlock user guide!

Follow these instructions and it will be working for you again:

That worked. I added the following 3 lines before my statement
Dim XLSPadlock As Object
Set XLSPadlock = Application.COMAddIns(“GXLS.GXLSPLock”).Object
XLSPadlock.SetOption Option:=“1”, value:=“1”

and then after the save statement, I set the value back to 0

 XLSPadlock.SetOption Option:="1", value:="0"