Hi Kev, the last option is what I am looking for. But I cannot run VBA script when protected. Is there any interface protection with similar function. Also upon closing can the sheet auto protected if not protected before closing.
Hi Kev, the last option is what I am looking for. But I cannot run VBA script when protected. Is there any interface protection with similar function. Also upon closing can the sheet auto protected if not protected before closing.
What you need to do is to unprotect your sheet first, then run your code, then protect it again - like this:But I cannot run VBA script when protected
![]()
Sub DoSomething() Sheets("Sheet1").Unprotect Password = "PASSWORD" 'HERE you put your code that does something Sheets("Sheet1").Protect Password = "PASSWORD" End If
Click *Add Reputation to thank those who helped you. Ask if anything is not clear
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks