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

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Joined
Jul 30, 2006
Messages
3,656
George,

Please post the code, and a description of what you are attempting to do.

Have a great day,
Stan
 

GeorgeB

Board Regular
Joined
Feb 16, 2002
Messages
239
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.
 

Forum statistics

Threads
1,181,102
Messages
5,928,062
Members
436,586
Latest member
latintxn

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
Top