Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Change cell format based on its color

Dear Experts

Being new to VBA I have following question.
In an Excel 2003 workbook, where all cells as default are protected, I
would like to unprotect cells with a specific color.
Can any of you give a clue?

Thanks in advance
Anders
Copenhagen

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Change cell format based on its color

Is the color produce by conditional formatting?

If not

assuming the sheet is unprotected.

For each cell in activesheet.UsedRange
if cell.interior.ColorIndex = 5
cell.Locked = False
end if
Next

--
Regards,
Tom Ogilvy

"Anders" wrote in message
oups.com...
Dear Experts

Being new to VBA I have following question.
In an Excel 2003 workbook, where all cells as default are protected, I
would like to unprotect cells with a specific color.
Can any of you give a clue?

Thanks in advance
Anders
Copenhagen



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Change cell format based on its color

Is it really that simple!
Thanks a lot Tom - my problem is solved.
Br
Anders

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
I want to change the cell format (color) based on a calc mtnmanus Excel Discussion (Misc queries) 4 August 6th 08 11:14 PM
Change tab color based on current color of a cell MarkT Excel Discussion (Misc queries) 0 May 22nd 08 05:46 PM
Conditional format: change row color based on cell value Carelle Excel Discussion (Misc queries) 2 January 3rd 08 09:26 PM
Excel: Syntax to change cell color based on color of another cell davew18 Excel Worksheet Functions 1 January 4th 07 01:24 PM
Browse Forms Controls and change TextBox color based on cell color StefanW Excel Programming 2 November 21st 04 07:06 PM


All times are GMT +1. The time now is 01:30 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"