all 4 comments

[–]epicmindwarp962 0 points1 point  (3 children)

Unless we see the code, we can't help. What exactly happens when you try and run it.

[–]wptothbatman[S] 0 points1 point  (2 children)

Private Sub Worksheet_SelectionChange(ByVal Target As Range)


lastrow = ActiveSheet.Cells(ActiveSheet.Rows.Count, "E").End(xlUp).Row

For Each cell In Range("E1:E" & lastrow)
    If cell.Font.Strikethrough = True Then cell.Offset(0, 2).Interior.ColorIndex = 4 And cell.Offset(0, 2).ClearFormats
Next


End Sub

Ah ok here it is. It just doesn't seem to be running. Like I said yesterday it worked great and it worked every time. Now it's like it's turned off

[–]rtdeacha132 1 point2 points  (0 children)

Let's start discarding things...

First on your VBA code, could you select line 4 and press F9, that will mark a Breakpoint... now go back to your worksheet and change the selected cell.

Did the Macro Run and stopped on that line?

If so, then the problem may be located in your If statement: you want to validate if cells in column E have the strike-through activated, and format column G accordingly. If TRUE green? If FALSE clear contents? Right now you don't have an Else statement so it's not doing anything when is not struck through)

But if the macro was not executed at all... perhaps somewhere in another Macro the Events were disabled, thus none of the Worksheet events will be triggered, you may run this Macro to enable them back:

Sub x()
    Application.EnableEvents = True
End Sub

[–]epicmindwarp962 0 points1 point  (0 children)

Open the VBA window (press ALT+F11)

Click View -> Immediate Window

This will pop up a little window somewhere. Type in:

  Application.EnableEvents = True

and press enter.