Hi, I am using advanced excel and used Workbook protect to set password in the file, but the file is still not protected when the user opens it. I hope you can help us is this issue? Thank you in advance.
Hello Fernan,
I have tested Workbook_Protect using the same parameters as you used, and it does protect the workbook.
Thank you for the screenshot of the code. I think I can see the problem there.
The call to protect the workbook happens after the workbook binary has been generated.
Try putting the Workbook_Protect action before the action to generate the binary of the workbook, and the workbook should be protected with a password.
I hope this helps!
Kind regards,
Stuart
Thanks Fernan, I will run a test with the latest release and check the results.
Thank you Stewart, I will try this and update you.
Best Regards.
Hi Stewart,
It worked Thanks for your support.
That is great to hear Fernan!