How do I make this Code apply / work after saving and closing the Workbook?
Code:
' This Sub is automatically called when there is any change on this worksheet.
' If the change causes the value of any cell in column E to exceed 1, then the value of the
' the same cell in column H replaces the formula in that cell.
Public Sub Worksheet_Change(ByVal Target As Range)
' Check to see if the change occurred in column E
If Target.Column = 5 Then
' Check to see if the change caused the value to go above 0
If Target.Value > 0 Then
' Assign the value of the corresponding cell in column B back to the cell as a value
' This is effectively the same as copy then "paste as value"
Cells(Target.Row, 8).Value = Cells(Target.Row, 8).Value
End If
End If
End Sub
Bookmarks