Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.interopoledde,microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Events for cell deletion

Are any events raised when cells are deleted?

I have just tested in Excel, and I seem to get a Workbook_SheetChange event,
and I expect the Worksheet_SheetChange and Worksheet_Change events work as
well. The problem is that I can't find any information about what the
arguments mean when cells are being deleted.

Thanks,
Aaron Queenan.


  #2   Report Post  
Posted to microsoft.public.excel.interopoledde,microsoft.public.excel.programming
external usenet poster
 
Posts: 179
Default Events for cell deletion

Aaron

Deleted as in Cleared Contents? If so, you can check whether the target
(the cell that was changed) is empty. Like this

Private Sub Worksheet_Change(ByVal Target As Range)

If IsEmpty(Target) Then
MsgBox "cell was deleted"
End If

End Sub

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Aaron Queenan" wrote in message
...
Are any events raised when cells are deleted?

I have just tested in Excel, and I seem to get a Workbook_SheetChange

event,
and I expect the Worksheet_SheetChange and Worksheet_Change events work as
well. The problem is that I can't find any information about what the
arguments mean when cells are being deleted.

Thanks,
Aaron Queenan.




  #3   Report Post  
Posted to microsoft.public.excel.interopoledde,microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Events for cell deletion

I mean when right-clicking on a cell/range/row/column and selecting
"Delete...". That way it shifts the other cells/rows/columns closer to the
top left, but unfortunately it only gives a Change event containing the new
data in the range, which is pretty useless because I want to find out the
cells which were removed in the process. :-( Is there any other event I
can listen to or property I can check to find out what was in the removed
cells?

Thanks,
Aaron.


"Dick Kusleika" wrote in message
...
Aaron

Deleted as in Cleared Contents? If so, you can check whether the target
(the cell that was changed) is empty. Like this

Private Sub Worksheet_Change(ByVal Target As Range)

If IsEmpty(Target) Then
MsgBox "cell was deleted"
End If

End Sub

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Aaron Queenan" wrote in

message
...
Are any events raised when cells are deleted?

I have just tested in Excel, and I seem to get a Workbook_SheetChange

event,
and I expect the Worksheet_SheetChange and Worksheet_Change events work

as
well. The problem is that I can't find any information about what the
arguments mean when cells are being deleted.

Thanks,
Aaron Queenan.






  #4   Report Post  
Posted to microsoft.public.excel.interopoledde,microsoft.public.excel.programming
external usenet poster
 
Posts: 179
Default Events for cell deletion

Aaron

Unfortunately, no. One option would be to replace the Delete
commandbarbutton with your own macro that copies the cells, then does the
normal delete. You would have to change three toolbars, namely the Cells,
Row and Column commandbars. Post back if that's something you want to try
and need help with it.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Aaron Queenan" wrote in message
...
I mean when right-clicking on a cell/range/row/column and selecting
"Delete...". That way it shifts the other cells/rows/columns closer to

the
top left, but unfortunately it only gives a Change event containing the

new
data in the range, which is pretty useless because I want to find out the
cells which were removed in the process. :-( Is there any other event I
can listen to or property I can check to find out what was in the removed
cells?

Thanks,
Aaron.


"Dick Kusleika" wrote in message
...
Aaron

Deleted as in Cleared Contents? If so, you can check whether the target
(the cell that was changed) is empty. Like this

Private Sub Worksheet_Change(ByVal Target As Range)

If IsEmpty(Target) Then
MsgBox "cell was deleted"
End If

End Sub

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Aaron Queenan" wrote in

message
...
Are any events raised when cells are deleted?

I have just tested in Excel, and I seem to get a Workbook_SheetChange

event,
and I expect the Worksheet_SheetChange and Worksheet_Change events

work
as
well. The problem is that I can't find any information about what the
arguments mean when cells are being deleted.

Thanks,
Aaron Queenan.








  #5   Report Post  
Posted to microsoft.public.excel.interopoledde,microsoft.public.excel.programming,microsoft.public.excel.sdk
external usenet poster
 
Posts: 30
Default Events for cell deletion

Thanks, Dick.

Unfortunately, we need a way that will work regardless of whether the user
or a program initiates the command.

Is it possible to listen for commands using the Excel 97 SDK, i.e. to query
Excel for the command handler, then replace it with my own?

Thanks,
Aaron Queenan.

"Dick Kusleika" wrote in message
...
Aaron

Unfortunately, no. One option would be to replace the Delete
commandbarbutton with your own macro that copies the cells, then does the
normal delete. You would have to change three toolbars, namely the Cells,
Row and Column commandbars. Post back if that's something you want to try
and need help with it.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Aaron Queenan" wrote in

message
...
I mean when right-clicking on a cell/range/row/column and selecting
"Delete...". That way it shifts the other cells/rows/columns closer to

the
top left, but unfortunately it only gives a Change event containing the

new
data in the range, which is pretty useless because I want to find out

the
cells which were removed in the process. :-( Is there any other event

I
can listen to or property I can check to find out what was in the

removed
cells?

Thanks,
Aaron.


"Dick Kusleika" wrote in message
...
Aaron

Deleted as in Cleared Contents? If so, you can check whether the

target
(the cell that was changed) is empty. Like this

Private Sub Worksheet_Change(ByVal Target As Range)

If IsEmpty(Target) Then
MsgBox "cell was deleted"
End If

End Sub

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Aaron Queenan" wrote in

message
...
Are any events raised when cells are deleted?

I have just tested in Excel, and I seem to get a

Workbook_SheetChange
event,
and I expect the Worksheet_SheetChange and Worksheet_Change events

work
as
well. The problem is that I can't find any information about what

the
arguments mean when cells are being deleted.

Thanks,
Aaron Queenan.












  #6   Report Post  
Posted to microsoft.public.excel.interopoledde,microsoft.public.excel.programming,microsoft.public.excel.sdk
external usenet poster
 
Posts: 179
Default Events for cell deletion

Aaron

I don't know, but I doubt it.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Aaron Queenan" wrote in message
...
Thanks, Dick.

Unfortunately, we need a way that will work regardless of whether the user
or a program initiates the command.

Is it possible to listen for commands using the Excel 97 SDK, i.e. to

query
Excel for the command handler, then replace it with my own?

Thanks,
Aaron Queenan.

"Dick Kusleika" wrote in message
...
Aaron

Unfortunately, no. One option would be to replace the Delete
commandbarbutton with your own macro that copies the cells, then does

the
normal delete. You would have to change three toolbars, namely the

Cells,
Row and Column commandbars. Post back if that's something you want to

try
and need help with it.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Aaron Queenan" wrote in

message
...
I mean when right-clicking on a cell/range/row/column and selecting
"Delete...". That way it shifts the other cells/rows/columns closer

to
the
top left, but unfortunately it only gives a Change event containing

the
new
data in the range, which is pretty useless because I want to find out

the
cells which were removed in the process. :-( Is there any other

event
I
can listen to or property I can check to find out what was in the

removed
cells?

Thanks,
Aaron.


"Dick Kusleika" wrote in message
...
Aaron

Deleted as in Cleared Contents? If so, you can check whether the

target
(the cell that was changed) is empty. Like this

Private Sub Worksheet_Change(ByVal Target As Range)

If IsEmpty(Target) Then
MsgBox "cell was deleted"
End If

End Sub

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Aaron Queenan" wrote in
message
...
Are any events raised when cells are deleted?

I have just tested in Excel, and I seem to get a

Workbook_SheetChange
event,
and I expect the Worksheet_SheetChange and Worksheet_Change events

work
as
well. The problem is that I can't find any information about what

the
arguments mean when cells are being deleted.

Thanks,
Aaron Queenan.












Reply
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
Cell Deletion SiH23 Excel Discussion (Misc queries) 2 January 21st 09 01:49 PM
Restrict cell deletion starguy Excel Discussion (Misc queries) 6 June 23rd 06 11:54 AM
Cell filter deletion Sergio Excel Discussion (Misc queries) 2 January 6th 06 06:54 PM
Prompt Before Cell Deletion Kryptonix New Users to Excel 3 October 17th 05 01:45 PM
#REF! after cell deletion Colin G Eastwood Excel Discussion (Misc queries) 1 December 2nd 04 01:22 PM


All times are GMT +1. The time now is 08:34 PM.

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

About Us

"It's about Microsoft Excel"