Share via

ProtectedViewWindow.Workbook returns Nothing

Al1as 1 Reputation point
2022-07-27T16:13:47.437+00:00

I have a VBA macro that suddenly stopped working after 3 years of functioning.

In my script - I address ProtectedViewWindow workbook and unlock it if it matches my criteria.

But now Application.ActiveProtectedViewWindow.Workbook returns 'Nothing' even though workbook clearly exists and is protected. ProtectedViewWindow has all other fields populated correctly (SourceName, SourcePath, Caption etc). But not the workbook reference.

Why did this stopped working? Is that somehow related to a security update?
And is there a work-around?

I'm on Microsoft® Excel® for Microsoft 365 MSO (Version 2206 Build 16.0.15330.20246) 64-bit

Microsoft 365 and Office | Excel | For business | Windows
Developer technologies | Visual Basic for Applications

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.