Private EventDel_CellsChange As Excel.DocEvents_ChangeEventHandler Public Sub UseDelegate() 'Get references to the the worksheet. xlBook = excelWB xlSheet1 = xlBook.Worksheets(2) CType(xlSheet1, Excel._Worksheet).Activate() 'Add an event handler for the Change event for Worksheet 'object. EventDel_CellsChange = New Excel.DocEvents_ChangeEventHandler( _ AddressOf CellsChange) AddHandler xlSheet1.Change, EventDel_CellsChange 'Make Excel visible and give the user control. xlApp.Visible = True xlApp.UserControl = True End Sub Private Sub CellsChange(ByVal Target As Excel.Range) 'This is called when a cell or cells on a worksheet are changed. MsgBox("Restrating Of Application Required") End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)