event echo (event fires twice) vba/vb

S

smanky

hi,

i am using an ItemChange(ByVal item As Object) event to let a msgbox pop up
once a task is completed. for some reason the event fires twice, once as
expected right after a task is completed, and another time after about 1
minute. i don't get it why it behaves like this....

i read somewhere that it might have to do with service packs, respectively
the order of installation of service pack and office. is this so? are there
any workarounds? i would love to avoid doing all the installation work on 15
machines....

oh, by the way, i have the same phenomenon with vb code that does the same.

thanks very much in advance.

~stephan

p.s. below is my code, since it is very basic and on one level it does what
i expect it to do, i assume that is more or less correct.

Public WithEvents myOlItems As Outlook.Items

Sub Application_startup()
Set myOlItems =
Application.GetNamespace("MAPI").GetDefaultFolder(olFolderTasks).Items
End Sub

Private Sub myOlItems_ItemChange(ByVal item As Object)
Dim unsers As Outlook.TaskItem
Set unsers = item
If unsers.Complete = True Then
MsgBox "hello world"
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top