Hi Team,
I am working on a worksheet event. My requirement is whenever new data is added to the table I am trying to call a macro.
(My table has been connected to Mysql database)
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Records As Range
Set Records = Range("Stockout")
If Not Application.Intersect(Records, Range(Target.Address)) Is Nothing Then
Call Module3.lastrow_value
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.ListObjects("StockOut").ListRows.Count) Is Nothing Then
Call Module3.lastrow_value
End If
End Sub
Kindly suggest which one is right to achieve my expectation.
Regards,
Vigash
I am working on a worksheet event. My requirement is whenever new data is added to the table I am trying to call a macro.
(My table has been connected to Mysql database)
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Records As Range
Set Records = Range("Stockout")
If Not Application.Intersect(Records, Range(Target.Address)) Is Nothing Then
Call Module3.lastrow_value
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.ListObjects("StockOut").ListRows.Count) Is Nothing Then
Call Module3.lastrow_value
End If
End Sub
Kindly suggest which one is right to achieve my expectation.
Regards,
Vigash