Application Level Event Handler

GeorgeB

Board Regular
Joined
Feb 16, 2002
Messages
239
Tried to create an event handler from the Microsoft Knowledge Base.
Tried evrything. Followed the instructions exactly. Nothing. Anyone else experienced this? Using XP sp2, macros enabled, security level set to medium. Thanks
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
In a Class Module:
Public WithEvents appevent As Application
(This is typed in to the top of the module)

Private Sub appevent_WindowResize(ByVal Wb As Excel.Workbook, byVal Wn As Excel.Window)
(The Class Module inserts this automatically)
MsgBox "You resized a window"
End Sub

In a standard module:
Dim myobject As New Class1
Sub test()
Set myobject.appevent = Application
End Sub

This is how the microsoft Knowledge Base instructs you how to create an Application Level Event Handler only I am unable to get it to work.
Thanks for responding.
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,871
Members
449,055
Latest member
excelhelp12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top