MS Excel is waiting for another application to complete OLE action

velkugan

Board Regular
Joined
Dec 5, 2009
Messages
55
HI All,

I am trying to collect mails from outlook public Folder. The macro is done in gathering mails fromm public folders. The concern is, during the mid way there is a popup comes as "MS Excel is waiting for another application to complete OLE action" with "OK" button.

Even after clik the OK button the excel hangs up for some time and the same popup comes back....

Durung this time when i try to access Outlook manually, i cannt.

the task manager shows my outlook is not responding.

belw is my code...

Code:
    Set objFolders = oNS.GetDefaultFolder(olPublicFoldersAllPublicFolders).Folders("BA").Folders("GSC2").Folders(Trim(Sheet1.Range("B3")))
    If Not objFolders Is Nothing Then
        Set itemNs = objFolders.Items.Restrict("[LastModificationTime] > '" & Date & "'") 'Find("[SenderName] = ""DOC TGT SOUTHCHINA""")
        ii = 2
        For Each itm In itemNs
            Sheet1.Range("G" & ii) = itm.Subject
            Sheet1.Range("F" & ii) = itm.SenderName
            Sheet1.Range("H" & ii) = itm.ReceivedTime
            Sheet1.Range("I" & ii) = CDate(Format(Now(), "dd-mm-yy ") & "12:00 AM")
            Sheet1.Range("j" & ii) = itm.ReceivedTime >= CDate(Format(Now(), "dd-mm-yyyy ") & "12:00 AM")
            ii = ii + 1
        Next
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,224,541
Messages
6,179,418
Members
452,912
Latest member
alicemil

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