Answer the question
In order to leave comments, you need to log in
How to catch an event in another Excel workbook?
Question such:
There is a book with the code on VBA. As the code executes, another workbook is created and opened. How to catch the SelectionChange event from the parent book on the sheet in the created one and write the value to the cell of the parent book?
Answer the question
In order to leave comments, you need to log in
Private WithEvents App As Application
Private Sub Workbook_Open() ' открытие книги
Set App = Application
End Sub
Private Sub App_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
If Sh.Name = "Поиск" Then
'Действия
End If
End Sub
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question