Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim Fig As String
If ActiveSheet.ProtectContents = True Then
LockAgain = True
ActiveSheet.Unprotect Password:="hannah"
End If
Task = ""
On Error GoTo finish
Select Case Target.Address
Case "$C$113:$D$113", "$C$116:$D$116"
Fig = Target.Value(1, 1)
Task = "Convert Text"
Case "$F$113", "$F$116"
Fig = Target.Value
Task = "Convert Text"
Case "$K$3", "$L$3", "$M$3"
Select Case Target.Value
Case Is <= 0
If ActiveSheet.Range("$N$3").Value = 0 Then
Task = "Grey Out Mortgages"
End If
Case Is > 0
Task = "Goto Mortgage"
End Select
End Select
Application.EnableEvents = False
Select Case Task
Case "Convert Text"
Target = TextConvert(Fig)
Case "Goto Mortgage"
If ActiveSheet.Cells(80, 8).Value = "No Mortgage" Then
ActiveSheet.Cells(80, 8) = ""
End If
If ActiveSheet.Cells(85, 4).Value = "No Mortgage" Then
ActiveSheet.Cells(85, 4) = ""
End If
Application.Goto reference:=ActiveSheet.Cells(79, 1), Scroll:=True
ActiveSheet.Cells(85, 4).Activate
Case "Grey Out Mortgages"
ActiveSheet.Cells(80, 8).Value = "No Mortgage"
If ActiveSheet.Cells(85, 4).Value = "" Then
ActiveSheet.Cells(85, 4).Value = "No Mortgage"
End If
If ActiveSheet.Cells(99, 8).Value = 0 Then
ActiveSheet.Cells(87, 4).Value = 0
ActiveSheet.Cells(89, 4).Value = 0
ActiveSheet.Cells(91, 4).Value = 0
End If
End Select
finish:
If LockAgain = True Then
ActiveSheet.Protect Password:="hannah"
End If
Application.EnableEvents = True
End Sub
I'm having some trouble with this Macro, basically, it works in Excel 97 but I'm having problems with it in excel 2003, it brekas everytime at Fig = Target.Value(1, 1)
does anyone have any ideas?
thanks!
Bookmarks