Thread: Case Satement
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
deelee[_6_] deelee[_6_] is offline
external usenet poster
 
Posts: 1
Default Case Satement


It's me again!

I've played around with the statement but still can't get it to work!

I thought it might help if I post my latest attempt so that you can see
where I'm going wrong!

Case "$C$3" 'Monday

'Non-working day
If Target.Value = "No" Then
ActiveSheet.Unprotect ("MyPassword")
Range("C:C").Locked = True
Range("$C$3").Locked = False
ActiveSheet.Protect ("MyPassword")

'Working Day
ElseIf Target.Value = "Yes" Then
ActiveSheet.Unprotect ("MyPassword")

Range("$C$6:$C$10,$C$16:$C$20,$C$26:$C$30,$C$36:$C $40,$C$46:$C$50").Locked
= False
ActiveSheet.Protect ("MyPassword")

'Public Holiday
ElseIf Target.Offset(1, 0) = "PH" Then
ActiveSheet.Unprotect ("MyPassword")
Range("$C$6:$C$10").Locked = True
ActiveSheet.Protect ("MyPassword")

EndIf

Thanks again

Dave


--
deelee
------------------------------------------------------------------------
deelee's Profile: http://www.excelforum.com/member.php...o&userid=34866
View this thread: http://www.excelforum.com/showthread...hreadid=550762