Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro Question

I need to protect my sheet from users making changes to certain cell
but I am encountering a problem with my macro buttons.

The button makes changes to cells that I have locked and protected fro
users. When i protect the sheet the button cannot make the changes an
gives an error.

Is there a way to allow the macro to do its work on locked cells whil
still protecting the cell from user changes

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Macro Question

Your macro will need to unprotect the sheet, make the changes then
re-protect the sheet.

ActiveSheet.Unprotect Password:="password"

ActiveSheet.Protect Password:="password"

Set the command button, TakeFocusOnClcik to False

Cheers
Nigel

"DangerMouse114 " wrote in
message ...
I need to protect my sheet from users making changes to certain cells
but I am encountering a problem with my macro buttons.

The button makes changes to cells that I have locked and protected from
users. When i protect the sheet the button cannot make the changes and
gives an error.

Is there a way to allow the macro to do its work on locked cells while
still protecting the cell from user changes?


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default Macro Question

The code assigned to the buttons need to unprotect the
target cells, change their values and then re-protect them


Patrick Molloy
Microsoft Excel MVP

-----Original Message-----
I need to protect my sheet from users making changes to

certain cells
but I am encountering a problem with my macro buttons.

The button makes changes to cells that I have locked and

protected from
users. When i protect the sheet the button cannot make

the changes and
gives an error.

Is there a way to allow the macro to do its work on

locked cells while
still protecting the cell from user changes?


---
Message posted from http://www.ExcelForum.com/

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro Question

Thanks Nigel! Worked like a charm!




Nigel wrote:
*Your macro will need to unprotect the sheet, make the changes then
re-protect the sheet.

ActiveSheet.Unprotect Password:="password"

ActiveSheet.Protect Password:="password"

Set the command button, TakeFocusOnClcik to False

Cheers
Nigel

"DangerMouse114 "
wrote in
message ...
I need to protect my sheet from users making changes to certai

cells
but I am encountering a problem with my macro buttons.

The button makes changes to cells that I have locked and protecte

from
users. When i protect the sheet the button cannot make the change

and
gives an error.

Is there a way to allow the macro to do its work on locked cell

while
still protecting the cell from user changes?


---
Message posted from http://www.ExcelForum.com/
* :) :) :) :) :( ;


--
Message posted from http://www.ExcelForum.com

Reply
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
Excel 2007 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
macro question peyman Excel Discussion (Misc queries) 2 September 17th 07 10:52 PM
MACRO QUESTION HELP Excel Discussion (Misc queries) 1 May 26th 06 05:59 PM
Macro Question Chris Excel Worksheet Functions 0 July 18th 05 04:02 PM
MACRO Question - Help Please!!!!!!!!!!!!!!!!! Frantic Excel-er Excel Discussion (Misc queries) 2 June 7th 05 03:43 PM


All times are GMT +1. The time now is 08:00 AM.

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

About Us

"It's about Microsoft Excel"