XL2000: Redo Delete Command Does Not Result in a Change Event (215696)



The information in this article applies to:

  • Microsoft Excel 2000

This article was previously published under Q215696

SYMPTOMS

In Microsoft Excel, the Redo Delete command on the Edit menu may not result in a change event as expected when you run a macro attached to the spreadsheet or workbook that is changed.

CAUSE

This behavior can occur when you use the Redo Delete command on the Edit menu in the manner shown in the following example:
  1. Start Excel, and then press ALT+F11 to start the Microsoft Visual Basic Editor.
  2. In the Project-VBAProject window, double-click Sheet1, and then type the following macro in the module sheet:
    Private Sub Worksheet_Change (ByVal Target As Excel.Range)
       MsgBox "Worksheet_Change event"
    End Sub
    						
    This macro runs when any change is made to sheet 1 of the workbook.
  3. In the Project-VBAProject window, double-click ThisWorkbook, and then type the following code in the code sheet:
    Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
       MsgBox "Workbook_SheetChange event"
    End Sub
    						
    This macro runs when any change is made to the workbook.
  4. Press ALT+F11 to return to Excel, and then type test in cell A1.

    Note the appearance of the two message boxes from the change event macros that you just created.
  5. Select cell A1, and then on the Edit menu, click Delete.
  6. In the Delete dialog box, accept the default (or click any option), and then click OK.

    Note that both message boxes appear.
  7. On the Edit menu, click Undo Delete.

    Note that the both message boxes appear.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Modification Type:MajorLast Reviewed:9/27/2003
Keywords:kbbug kbpending KB215696