A
AMK4
I have something odd going on here. I have a sheet that has a button o
it to which I've assigned a macro. The button's properties are set t
Locked and Lock Text.
Upon opening the worksheet containing this sheet, I have the followin
snippet run
Code
-------------------
wSheet.Protect Password:="cookies2006", Contents:=True, UserInterfaceOnly:=True, AllowFormattingColumns:=True
wSheet.Visible = xlSheetVisible
wSheet.Activate
wSheet.Range("D4").Selec
-------------------
When that runs, it locks everything just fine ... except the button.
can right click on it and assign a different macro, as if nothin
happened.
Now, if I manually unlock the sheet, and manually re-lock it, suddenl
the button is locked and I can no longer change the macro (which i
what I want to do in the first place.) However, by doing it manually
I loose the UserInterfaceOnly attribute. And this needs to be don
automatically anyway, not manually.
Is there something I'm missing
it to which I've assigned a macro. The button's properties are set t
Locked and Lock Text.
Upon opening the worksheet containing this sheet, I have the followin
snippet run
Code
-------------------
wSheet.Protect Password:="cookies2006", Contents:=True, UserInterfaceOnly:=True, AllowFormattingColumns:=True
wSheet.Visible = xlSheetVisible
wSheet.Activate
wSheet.Range("D4").Selec
-------------------
When that runs, it locks everything just fine ... except the button.
can right click on it and assign a different macro, as if nothin
happened.
Now, if I manually unlock the sheet, and manually re-lock it, suddenl
the button is locked and I can no longer change the macro (which i
what I want to do in the first place.) However, by doing it manually
I loose the UserInterfaceOnly attribute. And this needs to be don
automatically anyway, not manually.
Is there something I'm missing