Microsoft KB Archive/215696

= XL2000: Redo Delete Command Does Not Result in a Change Event =

Article ID: 215696

Article Last Modified on 9/27/2003

-

APPLIES TO


 * Microsoft Excel 2000 Standard Edition

-



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:  Start Excel, and then press ALT+F11 to start the Microsoft Visual Basic Editor.  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.   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.  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. Select cell A1, and then on the Edit menu, click Delete. In the Delete dialog box, accept the default (or click any option), and then click OK.

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

Note that the both message boxes appear.</li></ol>

<div class="status_section">

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

Additional query words: XL2000

Keywords: kbbug kbpending KB215696

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.