G
Guest
Hi
I have grouped cells in my worksheet. When I protect the worksheet I can no longer expand and collapse the groupings. I searched the forums and someone suggested putting in this code (which would have to be run each time the spreadsheet is opened)
Option Explici
Sub auto_open(
With Worksheets("sheet1"
.Protect Password:="hi", userinterfaceonly:=Tru
.EnableOutlining = Tru
End Wit
End Su
I am not very familiar with writing code, but I did try to put this in. I changed "sheet1" to the name of my sheet and I deleted this line (.Protect Password:="hi", userinterfaceonly:=True) because I do not want a password. I think that I just want to enable the outlining. Unfortunately, I did not get this to work. I still got an error when trying to expand the tree.
Any suggestions? I don't want to have to run the macro every time I open the sheet and I am hoping for another option. If there is no other option, can anyone give me a suggestion on where I am going wrong with the code
Thanks for your time.
I have grouped cells in my worksheet. When I protect the worksheet I can no longer expand and collapse the groupings. I searched the forums and someone suggested putting in this code (which would have to be run each time the spreadsheet is opened)
Option Explici
Sub auto_open(
With Worksheets("sheet1"
.Protect Password:="hi", userinterfaceonly:=Tru
.EnableOutlining = Tru
End Wit
End Su
I am not very familiar with writing code, but I did try to put this in. I changed "sheet1" to the name of my sheet and I deleted this line (.Protect Password:="hi", userinterfaceonly:=True) because I do not want a password. I think that I just want to enable the outlining. Unfortunately, I did not get this to work. I still got an error when trying to expand the tree.
Any suggestions? I don't want to have to run the macro every time I open the sheet and I am hoping for another option. If there is no other option, can anyone give me a suggestion on where I am going wrong with the code
Thanks for your time.