When opening an Excel file with VBA code (received by e-mail or copied and paste to different folder), the first time after enable the Macros (protected view) I have Run-time error 1004: Method 'Worksheets' of object '_Global' failed when an initial form opens. I press the button "End", workbook closes and, when re-open it again runs without problem.
If the same file is copied from my onedrive folder runs without error with same conditions...
I tried many different ways and I don´t find the solution.
I will be very gratefull if someone could guide me with this issue.