views:

21

answers:

1

as part of making a tool i have written a code which is perfectly working in my sytem but not in my friends pc both of use the same outlook version

here is snippet

Private WithEvents olInboxItems As Items

......

.... // some code here

Private Sub start_Click()

Dim objNS As nameSpace Set objNS = Application.Session ' instantiate objects declared WithEvents

Call accessInbox(inbox) // my own function Set olInboxItems = inbox.Items 'Set objNS = Nothing

Me.Hide End Sub

Private Sub olInboxItems_ItemAdd(ByVal Item As Object) On Error Resume Next

MsgBox "a Message recieved" 'Call download(Item) Call multiSubjectDownload(Item) //my own function

End Sub

what can be the problem ? why is it not working in my friends pc ?

i need to now if there are setting s that differ which is prevent the code to dect a new mail in inbox

PLz help

A: 

i found the error i was n't referring to inbox. so event was not firing because my item event was on inbox :)

Ravi