View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
HBj HBj is offline
external usenet poster
 
Posts: 4
Default Protect/Unprotect w/ VBA not working as supposed...

Hello,

My protecting Excel 97 VBA-code is as follows
With ActiveWorkbook.Sheets("MAIN")
.EnableSelection = xlUnlockedCells
.EnableAutoFilter = True
.Protect Contents:=True, userInterfaceOnly:=True

One of the Unprotect codes is
Sheets("Main").Select
ActiveSheet.Unprotect

....but

....after unprotect, copy/paste is not possible. What can be wrong with the
protect code? How can I restore the complete unprotect state?

HBj