+ Reply to Thread
Results 1 to 3 of 3

How to Capture insert row event in Excel using VBA

  1. #1
    Sri Ram
    Guest

    How to Capture insert row event in Excel using VBA

    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?

  2. #2
    NickHK
    Guest

    Re: How to Capture insert row event in Excel using VBA

    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?




  3. #3
    mcg
    Guest

    Re: How to Capture insert row event in Excel using VBA


    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


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1