May 19 2022
In Excel , in trust center > macro setting: if default clicked Enable VBA macros.When I open the excel, it will fail to run VBA with runtime error 1004. [VBA run-time error '1004' Method 'Worksheets' of object '_Global' failed] and the excel is still in 'Protected View'
**But the VBA work fine if I have set 'Disable VBA macros with notification' in Macro >setting and click 'Enable Editing' when I open the excel
I have created a testing excel below, you could download it and try when you have time. https://drive.google.com/file/d/1cP7e4uofhDcH7nOyj52GS3KaBO09vhec/view?usp=sharing
**It is work with placing the excel in a trusted location, but is there any other way?
You could find more information in below stackoverflow discussion.https://stackoverflow.com/questions/72302683/excel-if-trust-center-macro-setting-is-enable-vba-macro...Thanks,