I need to know how to capture the insert row event in an excel wroksheet
using VBA. If this is not possible, then is there any way to control the row
insert event?
I need to know how to capture the insert row event in an excel wroksheet
using VBA. If this is not possible, then is there any way to control the row
insert event?
There is no Row (or column) insert event.
One suggestion has been to watch for changes in the address of a named cell
somewhere outside your possible usedrange, in the SelectionChange event.
NickHK
"Sri Ram" <[email protected]> wrote in message
news:[email protected]...
> I need to know how to capture the insert row event in an excel wroksheet
> using VBA. If this is not possible, then is there any way to control the
row
> insert event?
Sri Ram napisal(a):
> I need to know how to capture the insert row event in an excel wroksheet
> using VBA. If this is not possible, then is there any way to control the row
> insert event?
put in b1 formula rows("a1:a1000")
in c1 you put value of b1
and
Private Sub Worksheet_Calculate()
Dim chng
chng= Range("B1") - Range("C1")
If chng<> 0 Then
If chng> 0 Then
MsgBox "Row inserted"
Else
MsgBox "Row deleted"
End If
Application.EnableEvents = False
Range("C1") = Range("B1")
Application.EnableEvents = True
End If
End Sub
mcg
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks