Using the following code just want to add the commented Line to work
Dim olApp As Outlook.Application
Dim olNs As Namespace
Dim Fldr As MAPIFolder
Dim olMail As Variant
Dim i As Integer
date2 = Date
Set olApp = New Outlook.Application
Set olNs = olApp.GetNamespace("MAPI")
Set Fldr1 = olNs.GetDefaultFolder(olFolderInbox)
Set Fldr = Fldr1.Folders("root")
i = 2
For Each olMail In Fldr.Items
receiveDate = CDate(olMail.ReceivedTime)
If InStr(olMail.Body, "Critical Error") > 0 And (receiveDate >= Date) Then 'Or _
'InStr(olMail.Subject, "DSR") > 0 Then
ActiveSheet.Cells(i, 1).Value = olMail.ReceivedTime
'ActiveSheet.Cells(i, 2).Value = olMail.SentTime
ActiveSheet.Cells(i, 3).Value = olMail.Subject
i = i + 1
End If
'olMail.Display
Next olMail
Set Fldr = Nothing
Set olNs = Nothing
Set olApp = Nothing