ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   monitoring range change (https://www.excelbanter.com/excel-programming/366652-monitoring-range-change.html)

Tufail

monitoring range change
 
hi
i have some run problam with following code, please help.
Code is as under
------
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Set VRange = Range("BD1:BV600")
For Each cell In Traget
If Union(cell, VRange).Address = VRange.Address Then
MsgBox " The changed cell is in the input range."
End If
Next cell
End Sub
------
Error is = run time-error '13': type mismatch

Tufail

monitoring range change
 
sorry again here with some more detail,

back ground color is yellow of = For Each cell In Traget


"Tufail" wrote:

hi
i have some run problam with following code, please help.
Code is as under
------
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Set VRange = Range("BD1:BV600")
For Each cell In Traget
If Union(cell, VRange).Address = VRange.Address Then
MsgBox " The changed cell is in the input range."
End If
Next cell
End Sub
------
Error is = run time-error '13': type mismatch


Tom Ogilvy

monitoring range change
 
Maybe it is only in the email, but "Traget" should be spelled "Target"

--
Regards,
Tom Ogilvy


"Tufail" wrote in message
...
sorry again here with some more detail,

back ground color is yellow of = For Each cell In Traget


"Tufail" wrote:

hi
i have some run problam with following code, please help.
Code is as under
------
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Set VRange = Range("BD1:BV600")
For Each cell In Traget
If Union(cell, VRange).Address = VRange.Address Then
MsgBox " The changed cell is in the input range."
End If
Next cell
End Sub
------
Error is = run time-error '13': type mismatch





All times are GMT +1. The time now is 07:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com