4 Leave Cover
4 Leave Cover

Reputation: 1276

EXCEL VBA UserInterfaceOnly:= True not working

When I use (some code here).copy destination:=(some code there). It will still prompt for protection issues on cells. Basically it just won't let my code runs.

Upvotes: 2

Views: 9882

Answers (2)

Dallin Romney
Dallin Romney

Reputation: 2761

I posted one approach to solving this here: https://stackoverflow.com/a/69730040/13307304

Like Peter Albert mentioned, the password itself should not be hardcoded

Upvotes: 0

Peter Albert
Peter Albert

Reputation: 17475

The status UserInterfaceOnly:=TRUEis unfortunately not stored in the file - therefore, if you reopen the file, it will be fully protected. Either use the Workbook_Open event to reapply this protection status - or unprotect and then reprotect the worksheet in your VBA code directly.

See Ozgrid for further details!

Upvotes: 14

Related Questions