Tech Support Guy banner
  • Please post in our Community Feedback thread for help with the new forum software! If you are having trouble logging in, please Contact Us for assistance.
Status
Not open for further replies.
1 - 3 of 3 Posts

·
Registered
Joined
·
5 Posts
Discussion Starter · #1 ·
I am trying to write a VB command that will run a macro when any data is changed within in a particular range of cells upon exiting any of those the cell.

For example in my workbook if someone changes data in any cell in column I in rows 7 through 497 I want my Run2 macro to run.


Here's what I have.

Private Sub Worksheet_Change(ByVal Target As Range)


If Target.Address = I7:I497 Then

Call Run2

End If

End Sub

I think its as simple as defining the range correctly but I can't find the proper command.
 

·
Registered
Joined
·
8,546 Posts
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("I7:I497")) Is Nothing Then
run2
End If
End Sub
 
1 - 3 of 3 Posts
Status
Not open for further replies.
Top