Macro to protect spreadsheet

  Gosford 16:32 07 Aug 2006
Locked

I would like to create a macro that will password protect a spreadsheet. I have tried to record a macro that will do this but when I run the macro it will only protect the spreadsheet without a password.

is there any way that I can achieve what I am trying?

  VoG II 16:39 07 Aug 2006

Sub test()
ActiveSheet.Protect Password:="test"
End Sub

  Gosford 22:28 07 Aug 2006

Thanks thats great.

It's easy when you know how!

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Fujitsu Lifebook P727 laptop review

11 best portfolio websites for designers and artists

Office for Mac buying guide: Price, Office 2017 rumours & new features

Comment désactiver les programmes qui s'exécutent au démarrage de Windows 10 ?