![]() |
#2
|
|||
|
|||
![]()
OK, figured it out. Followed MS's instructions on creating an event-handler object:
Using events with the Application object (Word) | Microsoft Docs In case anyone else ever needs something like this, it was simple: Create a class module: Insert -> Class Module In the View -> Properties window, give your new module a name. (I just used MS's example: EventClassModule ) In the class module, put this at the top to declare an object with events: Code:
Public WithEvents App As Word.Application Code:
Private Sub App_WindowActivate(ByVal Doc As Document, ByVal Wn As Window) MsgBox "Active!" End Sub Code:
Dim X As New EventClassModule Sub Register_Event_Handler() Set X.App = Word.Application End Sub |
Tags |
activate |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
This copy of MS Office not activated | chzuck | Office | 1 | 10-10-2021 03:10 PM |
I clicked "this document" in VBA thinking it was a menu button, it said "saving", how can I reverse | messgchr | Word VBA | 2 | 07-20-2020 06:52 PM |
Is my Office 'activated' or not? | mabel | Office | 6 | 08-01-2019 04:18 AM |
![]() |
eduzs | Word VBA | 1 | 08-22-2017 03:11 PM |
Hyperlink not activated by footpedal | Donone | PowerPoint | 2 | 05-05-2014 04:42 AM |