vba - Insert rows in a protected worksheet in excel 2010 -


i want insert rows in protected worksheet. using following code in thisworkbook code window, not working. can please me?

private sub workbook_open()      worksheets("sheet1")         .protect password:="vba2014", userinterfaceonly:=true, allowinsertingrows:=true         .enableoutlining = true     end  end sub 

the userinterfaceonly:=true parameter in worksheet.protect serves

protect user interface, not macros. if argument omitted, protection applies both macros , user interface.

that say, allows macros run on protected sheet users still restricted doing things allowed within protection settings

you try setting allowinsertingrows:=true when applying worksheet protection approach isn't effective e.g. if have tables/list objects or merged cells on sheet.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -