views:

44

answers:

1

Based on http://support.microsoft.com/kb/306108 I'd like to create a custom rule that shows a custom UserForm instead of the plain old MsgBox. What I wrote was this:

Dim alerts As CustomAlerts

Sub CustomMailMessageRule(Item As Outlook.MailItem)
   alerts.Messages.AddItem Item.Subject
   alerts.Show
End Sub

CustomAlerts is a UserForm containing a single ListBox.

Sadly my attempt does not work -- no window appears. What am I doing wrong?

A: 

Hi,

You need to create an instance of your UserForm

Set alerts = new CustomAlerts

Marcus

76mel