Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 55
Default Protecting Cell loses formatting

In a lookup sheet I have made I set the cells that hold my formulas to be
locked on protection. These cells that I speak of change text color based on
the returned results from the lookup. My trouble shows up after I protect the
worksheet, once protected the cells no longer change text color based on the
returned results.

File can be provided for review.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 55
Default Protecting Cell loses formatting

Also, I am not using conditional formatting since the field can return any
one of twelve different text colors., I was thinking about defining the text
to color in VB but am not certain where to start.

"FP Novice" wrote:

In a lookup sheet I have made I set the cells that hold my formulas to be
locked on protection. These cells that I speak of change text color based on
the returned results from the lookup. My trouble shows up after I protect the
worksheet, once protected the cells no longer change text color based on the
returned results.

File can be provided for review.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 55
Default Protecting Cell loses formatting

This is what I have so far, the macro does not like the Me.Range. What should
I be using?

Private Sub Color_G6()
Dim Num As Long
Dim rng As Range
Set rng = Me.Range("G6")
On Error GoTo endit
Application.EnableEvents = False
'Determine the color
Select Case UCase(rng.Value)
Case Is = "BLUE": Num = 5 'blue
Case Is = "ORANGE": Num = 45 'orange
Case Is = "GREEN": Num = 10 'green
Case Is = "BROWN": Num = 53 'brown
Case Is = "SLATE": Num = 15 'slate
Case Is = "WHITE": Num = 1 'black
Case Is = "RED": Num = 3 'red
Case Is = "BLACK": Num = 1 'black
Case Is = "YELLOW": Num = 6 'yellow
Case Is = "VIOLET": Num = 54 'violet
Case Is = "ROSE": Num = 38 'rose
Case Is = "AQUA": Num = 42 'aqua
End Select
'Apply the color
rng.Font.ColorIndex = Num
endit:
Application.EnableEvents = True
End Sub

"FP Novice" wrote:

Also, I am not using conditional formatting since the field can return any
one of twelve different text colors., I was thinking about defining the text
to color in VB but am not certain where to start.

"FP Novice" wrote:

In a lookup sheet I have made I set the cells that hold my formulas to be
locked on protection. These cells that I speak of change text color based on
the returned results from the lookup. My trouble shows up after I protect the
worksheet, once protected the cells no longer change text color based on the
returned results.

File can be provided for review.

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
Copying tab loses formatting Brad E. Excel Worksheet Functions 7 October 9th 09 11:04 AM
Preserving cell formatting when protecting or unrprotecting Colin Hayes Excel Discussion (Misc queries) 0 July 1st 07 10:47 PM
euro symbol loses formatting if bold cadiehl Excel Discussion (Misc queries) 2 July 31st 06 02:49 PM
Excel workspace loses formatting Snarf Excel Discussion (Misc queries) 3 March 16th 06 03:47 PM
Concatenation formula loses text wrap formatting DFM Excel Discussion (Misc queries) 5 December 27th 04 01:45 PM


All times are GMT +1. The time now is 05:47 PM.

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"