Password protection for excel file using COM-Handle

pri_252

New Member
Hi All,

I am creating an excel file using COM-Handle. In one of the worksheet I need to add few properties as below:
Protect this sheet with password ‘123’. It should be allowed to Selected locked cells, Select unlocked cells, Format Cells, Format Columns, Format Rows and Sort.

Can someone help me how it should be added.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
A good approach is to use the Excel Macro recorder, then manually make the required changes to the workbook. Then stop the macro recorder and open the Visual Basic editor to see the resulting code. It should give you a good indication of the objects/properties/methods you need to put into your ABL code.
 
Top