98.8% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel Training and help » Macros
Macros
Resolved · Low Priority · Version 365
RE: macros
Hi Susie,
Thank you for the forum question.
The macro below will protect all sheets in the workbook the code is executed in with the password myPassword. If you want another password change the password in the code.
Sub ProtectSheetsWithPassword()
'Protect worksheet with a password
For i=1 to Sheets.count
Sheets(i).Protect Password:="myPassword"
Next i
End Sub
The link below is to a website, where you can find a lot of vba protection options
https://exceloffthegrid.com/vba-code-worksheet-protection/
Kind regards
Jens Bonde
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector
Thu 12 May 2022: Automatically marked as resolved.
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Change the Default Width of All Columns in Excel 2010If you want to change the width of the columns in your Excel 2010 spreadsheet, making them either larger or smaller, here's how: |