View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kjetil Kjetil is offline
external usenet poster
 
Posts: 7
Default How to unprotect target xls-sheet in VBA using advanced filter

Perfect! Thank a lot!

BR Kjetil

"Mike H" wrote:

Maybe,

Sub protectmenot()
Worksheets("Sheet3").Unprotect Password:="mypass"
'do you stuff
Worksheets("Sheet3").Protect Password:="mypass"
End Sub

Mike

"Kjetil" wrote:

Have a spreadsheet with advanced filter, that copies the result to another
sheet. Won't work with sheet-protection enabled. Anyone knows how to
unprotect the target sheet prior to the automated copying, and then
protecting the sheet again, to avoid user-error...?

other suggestions?