PC Review


Reply
Thread Tools Rate Thread

deleted cells

 
 
Karen53
Guest
Posts: n/a
 
      9th Aug 2009
Hi,

Is there a way to catch when cells are deleted from certain columns of a
worksheet?
--
Thanks for your help.
Karen53
 
Reply With Quote
 
 
 
 
Jacob Skaria
Guest
Posts: n/a
 
      9th Aug 2009
Karen, try the worksheet change event..(Right click the sheet tab>view code)

Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox Target.Address
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Karen53" wrote:

> Hi,
>
> Is there a way to catch when cells are deleted from certain columns of a
> worksheet?
> --
> Thanks for your help.
> Karen53

 
Reply With Quote
 
Karen53
Guest
Posts: n/a
 
      9th Aug 2009
Hi Jacob,

Thank you for your reply.

In doing this, won't it give me any change? How do I determine cells were
deleted?

--
Thanks for your help.
Karen53


"Jacob Skaria" wrote:

> Karen, try the worksheet change event..(Right click the sheet tab>view code)
>
> Private Sub Worksheet_Change(ByVal Target As Range)
> MsgBox Target.Address
> End Sub
>
> If this post helps click Yes
> ---------------
> Jacob Skaria
>
>
> "Karen53" wrote:
>
> > Hi,
> >
> > Is there a way to catch when cells are deleted from certain columns of a
> > worksheet?
> > --
> > Thanks for your help.
> > Karen53

 
Reply With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      9th Aug 2009
If you mean delete contents of a cell..

Private Sub Worksheet_Change(ByVal Target As Range)
If IsEmpty(Target) Then MsgBox "Trying to delete contents"
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Karen53" wrote:

> Hi Jacob,
>
> Thank you for your reply.
>
> In doing this, won't it give me any change? How do I determine cells were
> deleted?
>
> --
> Thanks for your help.
> Karen53
>
>
> "Jacob Skaria" wrote:
>
> > Karen, try the worksheet change event..(Right click the sheet tab>view code)
> >
> > Private Sub Worksheet_Change(ByVal Target As Range)
> > MsgBox Target.Address
> > End Sub
> >
> > If this post helps click Yes
> > ---------------
> > Jacob Skaria
> >
> >
> > "Karen53" wrote:
> >
> > > Hi,
> > >
> > > Is there a way to catch when cells are deleted from certain columns of a
> > > worksheet?
> > > --
> > > Thanks for your help.
> > > Karen53

 
Reply With Quote
 
Karen53
Guest
Posts: n/a
 
      9th Aug 2009
Hi Jacob,

No, I mean acutally deleting the cell, not just the contents. Delete >>
Shift cells up etc. Can this be determined?
--
Thanks for your help.
Karen53


"Jacob Skaria" wrote:

> If you mean delete contents of a cell..
>
> Private Sub Worksheet_Change(ByVal Target As Range)
> If IsEmpty(Target) Then MsgBox "Trying to delete contents"
> End Sub
>
> If this post helps click Yes
> ---------------
> Jacob Skaria
>
>
> "Karen53" wrote:
>
> > Hi Jacob,
> >
> > Thank you for your reply.
> >
> > In doing this, won't it give me any change? How do I determine cells were
> > deleted?
> >
> > --
> > Thanks for your help.
> > Karen53
> >
> >
> > "Jacob Skaria" wrote:
> >
> > > Karen, try the worksheet change event..(Right click the sheet tab>view code)
> > >
> > > Private Sub Worksheet_Change(ByVal Target As Range)
> > > MsgBox Target.Address
> > > End Sub
> > >
> > > If this post helps click Yes
> > > ---------------
> > > Jacob Skaria
> > >
> > >
> > > "Karen53" wrote:
> > >
> > > > Hi,
> > > >
> > > > Is there a way to catch when cells are deleted from certain columns of a
> > > > worksheet?
> > > > --
> > > > Thanks for your help.
> > > > Karen53

 
Reply With Quote
 
Karen53
Guest
Posts: n/a
 
      9th Aug 2009
I considered comparing the last used cells to the worksheet on activate to
when it deactivates but this would not really tell me if cells were deleted.
More data could have been input and cells deleted giving me the same last
used cell or more cells. I thought perhaps there was a way to tell if
"Delete" was invoked and at what cell.
--
Thanks for your help.
Karen53


"Jacob Skaria" wrote:

> If you mean delete contents of a cell..
>
> Private Sub Worksheet_Change(ByVal Target As Range)
> If IsEmpty(Target) Then MsgBox "Trying to delete contents"
> End Sub
>
> If this post helps click Yes
> ---------------
> Jacob Skaria
>
>
> "Karen53" wrote:
>
> > Hi Jacob,
> >
> > Thank you for your reply.
> >
> > In doing this, won't it give me any change? How do I determine cells were
> > deleted?
> >
> > --
> > Thanks for your help.
> > Karen53
> >
> >
> > "Jacob Skaria" wrote:
> >
> > > Karen, try the worksheet change event..(Right click the sheet tab>view code)
> > >
> > > Private Sub Worksheet_Change(ByVal Target As Range)
> > > MsgBox Target.Address
> > > End Sub
> > >
> > > If this post helps click Yes
> > > ---------------
> > > Jacob Skaria
> > >
> > >
> > > "Karen53" wrote:
> > >
> > > > Hi,
> > > >
> > > > Is there a way to catch when cells are deleted from certain columns of a
> > > > worksheet?
> > > > --
> > > > Thanks for your help.
> > > > Karen53

 
Reply With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      9th Aug 2009
Hi Karen

There is no delete event as such; however if you want to track a particular
column try the below..

--If you want to track deletion in ColA
--Select a cell out of the data area in ColA..say (cell A100)
--Define a name say 'lastRow' and enter the row number 100 in the cell
--The below will compare the named range value and its current row number.
If the row number is smaller those are deletions ...

Private Sub Worksheet_Change(ByVal Target As Range)
If Range("lastRow").Row < Range("lastRow").Value Then _
MsgBox "Cells deleted from ColA"
End Sub


If this post helps click Yes
---------------
Jacob Skaria


"Karen53" wrote:

> I considered comparing the last used cells to the worksheet on activate to
> when it deactivates but this would not really tell me if cells were deleted.
> More data could have been input and cells deleted giving me the same last
> used cell or more cells. I thought perhaps there was a way to tell if
> "Delete" was invoked and at what cell.
> --
> Thanks for your help.
> Karen53
>
>
> "Jacob Skaria" wrote:
>
> > If you mean delete contents of a cell..
> >
> > Private Sub Worksheet_Change(ByVal Target As Range)
> > If IsEmpty(Target) Then MsgBox "Trying to delete contents"
> > End Sub
> >
> > If this post helps click Yes
> > ---------------
> > Jacob Skaria
> >
> >
> > "Karen53" wrote:
> >
> > > Hi Jacob,
> > >
> > > Thank you for your reply.
> > >
> > > In doing this, won't it give me any change? How do I determine cells were
> > > deleted?
> > >
> > > --
> > > Thanks for your help.
> > > Karen53
> > >
> > >
> > > "Jacob Skaria" wrote:
> > >
> > > > Karen, try the worksheet change event..(Right click the sheet tab>view code)
> > > >
> > > > Private Sub Worksheet_Change(ByVal Target As Range)
> > > > MsgBox Target.Address
> > > > End Sub
> > > >
> > > > If this post helps click Yes
> > > > ---------------
> > > > Jacob Skaria
> > > >
> > > >
> > > > "Karen53" wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > Is there a way to catch when cells are deleted from certain columns of a
> > > > > worksheet?
> > > > > --
> > > > > Thanks for your help.
> > > > > Karen53

 
Reply With Quote
 
Karen53
Guest
Posts: n/a
 
      9th Aug 2009
Thanks Jacob!
--
Thanks for your help.
Karen53


"Jacob Skaria" wrote:

> Hi Karen
>
> There is no delete event as such; however if you want to track a particular
> column try the below..
>
> --If you want to track deletion in ColA
> --Select a cell out of the data area in ColA..say (cell A100)
> --Define a name say 'lastRow' and enter the row number 100 in the cell
> --The below will compare the named range value and its current row number.
> If the row number is smaller those are deletions ...
>
> Private Sub Worksheet_Change(ByVal Target As Range)
> If Range("lastRow").Row < Range("lastRow").Value Then _
> MsgBox "Cells deleted from ColA"
> End Sub
>
>
> If this post helps click Yes
> ---------------
> Jacob Skaria
>
>
> "Karen53" wrote:
>
> > I considered comparing the last used cells to the worksheet on activate to
> > when it deactivates but this would not really tell me if cells were deleted.
> > More data could have been input and cells deleted giving me the same last
> > used cell or more cells. I thought perhaps there was a way to tell if
> > "Delete" was invoked and at what cell.
> > --
> > Thanks for your help.
> > Karen53
> >
> >
> > "Jacob Skaria" wrote:
> >
> > > If you mean delete contents of a cell..
> > >
> > > Private Sub Worksheet_Change(ByVal Target As Range)
> > > If IsEmpty(Target) Then MsgBox "Trying to delete contents"
> > > End Sub
> > >
> > > If this post helps click Yes
> > > ---------------
> > > Jacob Skaria
> > >
> > >
> > > "Karen53" wrote:
> > >
> > > > Hi Jacob,
> > > >
> > > > Thank you for your reply.
> > > >
> > > > In doing this, won't it give me any change? How do I determine cells were
> > > > deleted?
> > > >
> > > > --
> > > > Thanks for your help.
> > > > Karen53
> > > >
> > > >
> > > > "Jacob Skaria" wrote:
> > > >
> > > > > Karen, try the worksheet change event..(Right click the sheet tab>view code)
> > > > >
> > > > > Private Sub Worksheet_Change(ByVal Target As Range)
> > > > > MsgBox Target.Address
> > > > > End Sub
> > > > >
> > > > > If this post helps click Yes
> > > > > ---------------
> > > > > Jacob Skaria
> > > > >
> > > > >
> > > > > "Karen53" wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > Is there a way to catch when cells are deleted from certain columns of a
> > > > > > worksheet?
> > > > > > --
> > > > > > Thanks for your help.
> > > > > > Karen53

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
protected cells can be deleted?! DannyS Microsoft Excel Misc 7 31st Jan 2008 05:49 PM
How can I retrieve cells which have been permanently deleted =?Utf-8?B?RWxseSBTdG9rZXM=?= Microsoft Excel Worksheet Functions 1 13th Mar 2007 10:32 AM
How to protect cells from getting deleted or resized? nilangini Microsoft Excel Worksheet Functions 1 21st Feb 2006 08:47 PM
#Ref! in cells of row linked to deleted row lburg801 Microsoft Excel Misc 0 28th Oct 2005 10:56 PM
Datagrid deleted cells still visible william_dudek@yahoo.com Microsoft VB .NET 1 28th Sep 2005 10:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:18 PM.