Bezique
Bezique

Reputation: 37

Excel form control macro updates another sheet, Worksheet_Change event does not trigger

I have an Excel ListBox (not ActiveX as these are causing display issues) with an Excel (dialog menu-driven) macro that outputs its value to a named range cell on a different sheet to the Listbox. In that sheet's code I have the below

Private Sub Worksheet_Change(ByVal Target As Range)
    Debug.Print "ping"
End Sub

The macro event does not trigger when I click on the Listbox (therefore updating the named range cell value). I have verified that the macro executes when I directly update that sheet.

I assume the form control macro is circumnavigating the sheet event trigger. Am I right? Does anybody know an efficient workaround for this? I am stumped.

Thanks Kindly

Upvotes: 1

Views: 405

Answers (1)

Pᴇʜ
Pᴇʜ

Reputation: 57683

You can assign a macro to the ListBox as ListBox1_Change event (right click › assign macro) which will be executed on change of the ListBox value instead of Worksheet_Change then.

Probably that is why the Worksheet_Change is not triggered anymore when using the ListBox to change the cell value.

Upvotes: 0

Related Questions