A
Ashish
Hi,
I am writing the following piece of code to change a cell color when its
content is changed:
*******************************************************
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("$E$25")) Is Nothing Then
If ThisWorkbook.Worksheets(6).Cells(25, 5) > 0 Then
ThisWorkbook.Worksheets(6).Cells(25, 5).Interior.Pattern = xlGray16
End If
End Sub
*******************************************************
However, my excel window crashes and i get the following message "Microsoft
Excel has encoutered a problem and needs to close..."
Can anyone tell me why this should happen?
Appreciate an urgent response.
Thanks and regards,
Ashish
I am writing the following piece of code to change a cell color when its
content is changed:
*******************************************************
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("$E$25")) Is Nothing Then
If ThisWorkbook.Worksheets(6).Cells(25, 5) > 0 Then
ThisWorkbook.Worksheets(6).Cells(25, 5).Interior.Pattern = xlGray16
End If
End Sub
*******************************************************
However, my excel window crashes and i get the following message "Microsoft
Excel has encoutered a problem and needs to close..."
Can anyone tell me why this should happen?
Appreciate an urgent response.
Thanks and regards,
Ashish