Macro to protect spreadsheet

  Gosford 16:32 07 Aug 06
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 06

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

  Gosford 22:28 07 Aug 06

Thanks thats great.

It's easy when you know how!

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

Qualcomm Snapdragon 835 benchmarks: Antutu, Geekbench 4, GFXBench and PCMark results

1995-2015: How technology has changed the world in 20 years

This stop-frame animation tells a moving story of domestic violence for Refuge

New iPad 2017 preview: Apple's affordable but underspecced new iPad may appeal to the education…