I have a macro that unprotects the calc sheet, runs a sort, the reprotects the sheet.
This is to prevent the non-computer savvy user who will be ultimately using this spreadsheet from accidentally modifying the contents of certain cells.
The macro works perfectly, except for one small glitch. When protecting the sheet, the popup appears asking for a password. I would just as soon this didn’t happen. I do not want my technically challenged user to have to deal with this popup. The relevant code looks like this.
rem ----------------------------------------------------------------------
dim args3(0) as new com.sun.star.beans.PropertyValue
args3(0).Name = "Protect"
args3(0).Value = true
dispatcher.executeDispatch(document, ".uno:Protect", "", 0, args3())
How can I change this code to not bring up the popup?