View Single Post
  #5   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
Nick Hodge Nick Hodge is offline
external usenet poster
 
Posts: 1,173
Default Excel 2007 VBA

Correct

Thinking about it you should reference the sheet explicitly as it may ne be
active

Worksheets("Sheet1").Protect

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
web:
www.nickhodge.co.uk
blog: www.nickhodge.co.uk/blog/

FREE UK OFFICE USER GROUP MEETING, MS READING, 27th APRIL 2007
www.officeusergroup.co.uk

"teepee" wrote in message
...

"Nick Hodge" wrote

How about the UserForm_Deactivate() event?

Private Sub UserForm_Deactivate()
ActiveSheet.Protect
End Sub

And my final dumb question - why does this subcommand not work. Presumably
it goes inside the userform?