ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Application.EnableEvents = true, but no event fires (https://www.excelbanter.com/excel-programming/314028-application-enableevents-%3D-true-but-no-event-fires.html)

Wexler

Application.EnableEvents = true, but no event fires
 
I have an ActiveX DLL containing macros and forms for my excel
spreadsheet.
In one form, when you click OK, it writes the value of a text box to a
cell, which should generate a worksheet_change event in the workbook.

In the form:

Private Sub OK_Click()
ThisApp.EnableEvents = True
ThisWB.ActiveSheet.Range("B5").value = NameTextBox.Text
Unload Me
End Sub
(ThisApp is a variable in the DLL set to the active Excel.Application)
(ThisWB is a variable in the DLL set to the active Excel Workbook)

When you click OK, it changes cell B5, but does not generate a
Worksheet Change Event in the workbook at all. Why not??? Any
ideas???

- Wes


All times are GMT +1. The time now is 07:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com