I have a sheet that is locked (by macro) and distributed to users. Some of the rows in the sheet are grouped together. The problem is that, if the sheet is locked, the user cannot expand/contract the grouped rows.
Is there a way using macro/VB code so that user can expand/contract the grouped rows while the sheet remains locked.
What version of XL are you using? With XL 2002 or 2003, you have more options to allow users to make changes.
Yes, you can code to unlock and relock. However, maybe a better way is to allow UserInterfaceOnly, and control all options within code (including the grouping options). This prevents changes by the user, but allows code to manipulate the worksheet.
old, slow, and confused
but at least I'm inconsistent!
My other problem now is that I am unlocking only one row in the macro. This one row is replaced by multiple rows fetched from database and grouped together in one row when another macro is triggered.
Now since I have unlocked only one row, I am able to edit only the first row of the grouped rows. Is there a way to unlock all the rows that are grouped together. I cannot hard code the values in macro as the rows are fetched from database and the number of rows is unknown.