LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Locking buttons on sheet


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

--
AMK
-----------------------------------------------------------------------
AMK4's Profile: http://www.excelforum.com/member.php...fo&userid=1914
View this thread: http://www.excelforum.com/showthread.php?threadid=50712

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
locking a sheet Brooks[_2_] Excel Discussion (Misc queries) 2 March 9th 08 11:16 PM
Locking A sheet Nigel Excel Discussion (Misc queries) 0 January 10th 07 06:37 PM
locking formula in cells in without locking whole sheet SuziQ Excel Discussion (Misc queries) 1 July 21st 06 03:58 PM
Locking a sheet?? mcr1 Excel Discussion (Misc queries) 1 January 9th 06 05:31 PM
Locking a sheet... Jay Gustafson Excel Programming 1 July 20th 04 04:11 PM


All times are GMT +1. The time now is 01:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"