Hi, for some reason my macro won't run on a password protected workbook.
This is a password which comes up when I open the workbook.
Hi, for some reason my macro won't run on a password protected workbook.
This is a password which comes up when I open the workbook.
Hi,
Within your macro ... a couple of modifications :
1. Start by Un-protecting
2. Keep your current code
3. End by Re-Protecting
Hope this will help
Thanks for advising but this didn't work.
Is Protecting the same as a Password by the way. I have a password. Doing it by Prepare/Encrypt. It's in Excel 2007.
Two possibilities :
1. Read and Understand the following :
https://www.ozgrid.com/VBA/excel-macro-protected-sheet.htm
Or
2. Post your macro
Hope this will help
Thanks. I actually did read the info in the link before.
If I try to run the macro manually, the error is "Because of your security settings, macros have been disabled. To run macros, you need to reopen this workbook, and then choose to enable macros. For more information about enabling macros, click Help."
You are welcome
Beforehand, you do need, at The Excel level, to enable Macros ...
https://www.howtodiyeverything…plete-step-by-step-guide/
Hope this will help
Thanks again but I did actually do all of this stuff before as well.
Well ... you cannot get this Error Message :
Quote"Because of your security settings, macros have been disabled. To run macros, you need to reopen this workbook, and then choose to enable macros.
IF from the Office Menu ... you have selected Options and adjusted your options in the Trust Center ...
Ok thanks for looking into.
What is the macro doing?
Have Macros been enabled?
Yes, everything is enabled. If I take the password protection out, it all works.
Thanks. I did look at this but it seems to be for protecting the sheet or cells.
Mine is a workbook which is password protected so that only I can view it. After that all cells can be edited.
Please see attached workbook.
The password is pw1.
Try and run the macro and let me know please.
When I open the workbook and enable macros the code works.
Thanks for confirming then royUK.
I don't understand why you are getting issues with this.
I don't know either. I did the macro a few months ago, presumably it worked then. Maybe it's something to do with registry settings as I would have changed a few things.
There's nothing in that workbook that would affect the registry. If you have made a registry change that stops macros running then it would affect all workbooks.
Ok sure.
Maybe if the Excel settings are revisited. In Trust Center Settings.
Don’t have an account yet? Register yourself now and be a part of our community!