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: 70
Default Protecting worksheet cause vba code to fail

I have the following code in the Worksheet_Change event of a worksheet.

Case "$E$14" 'Approval status
If Target.Value < "" Then
If Target.Value = "Not Submitted" Then
Target.Font.Color = 255
Else
Target.Font.Color = 0
End If
End If

The code works fine, until I turn on the Protect Sheet feature. Then it
generates an error code 1004 (Application-defined or object-defined error).
Does anyone know why protecting the worksheet would cause the code to fail?

Ken
 
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
Changing macro security causes VBA code to fail [email protected] Excel Programming 4 October 26th 08 11:40 AM
Range("Reset Sheet!F13").Select Makes VBA Code Fail ToferKing Excel Programming 3 July 11th 07 04:18 AM
Placement of variables in called sub causes code to fail acampbell Excel Programming 4 March 23rd 07 04:52 PM
Links to 2nd closed worksheet fail when using offset function ?? Jordan795 Excel Worksheet Functions 1 June 21st 05 01:43 AM
Protecting buttons with VB code rather than protecting sheets/books? StargateFanFromWork Excel Programming 2 July 16th 04 04:03 PM


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