LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
mcg mcg is offline
external usenet poster
 
Posts: 18
Default 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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop Capture Event OverAC[_19_] Excel Programming 4 April 11th 06 02:08 PM
Any way to capture an Autofilter event? mrwaller Excel Programming 1 January 20th 06 06:15 PM
How to capture the event before any sheet calculating in Excel JohnDing[_2_] Excel Programming 1 December 23rd 04 03:04 AM
How to capture the event before any sheet calculating in Excel JohnDing[_2_] Excel Programming 0 December 23rd 04 01:00 AM
Capture scrolling event Allen[_12_] Excel Programming 2 April 22nd 04 03:37 AM


All times are GMT +1. The time now is 06:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"