ich habe in meiner Exceltabelle ein eingebettetes Word-Dokument.
Ich möchte darauf reagieen, wenn das Word-Dokument den Fokus verliert. Wie mache ich das?
Danke und Gruß
Uppe
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MsgBox Selection.Name
End Sub
Aber leider reagiert das Ereignis gar nicht auf die Auswahl des Word-Dokuments :-('#### Code in einem allgemeinen Modul ####
Option Explicit
Public bolDocLostFocus As Boolean
Sub WordDocSelected()
Dim a
a = Application.Caller
bolDocLostFocus = True
ActiveSheet.Shapes(a).Select
End Sub
'Code im Modul des Tabellenblatts mit dem Word-Objekt
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If bolDocLostFocus = True Then
'Aktion nachdem Word-Objekt Fokus hatte
MsgBox "Doc-Objekt lost Fokus"
bolDocLostFocus = False
End If
End Sub