Can we assume that the folder 'Old' already exists as a sub folder of Inbox; that you are running the macro from Excel and not Outlook; and the folder structure is otherwise standard? Then you need something like the following:
Note that if you are running from Excel, if Outlook is already running it is quicker to use the existing Outlook process rather than create another. If running from Outlook the code can be simplified.
As you want to process both the inbox and the sent items folders, you will have to process them separately.
Option Explicit
Sub MoveEmail()
Dim oOutlookApp As Object 'Outlook.Object
Dim olNS As Object 'Outlook.NameSpace
Dim moveFolder As Object 'Outlook.MAPIFolder
Dim inFolder As Object 'Outlook.MAPIFolder
Dim outFolder As Object
Dim MyReceivedItem As Object 'Outlook.MailItem
Dim MySentItem As Object
Dim sentDate As String
Dim askDate As String
Dim i As Long, j As Long
Dim inCount As Long, outCount As Long
Dim mySub As String
On Error Resume Next
'Get Outlook if it's running
Set oOutlookApp = GetObject(, "Outlook.Application")
'Outlook wasn't running, start it from code
If Err <> 0 Then
Set oOutlookApp = CreateObject("Outlook.Application")
End If
On Error GoTo 0
askDate = InputBox("Enter the date in the format 'mm/dd'", "Process Date", "12/01")
Set olNS = oOutlookApp.GetNamespace("MAPI")
Set inFolder = olNS.GetDefaultFolder(6)
Set outFolder = olNS.GetDefaultFolder(5) 'Note the deleted items folder would be (3)
Set moveFolder = inFolder.Folders("Old")
'Inbox
inCount = inFolder.Items.Count
If inCount = 0 Then
MsgBox "There are no messages in the Inbox Folder.", vbInformation, _
"InBox Folder"
Exit Sub
End If
For i = inCount To 1 Step -1
Set MyReceivedItem = inFolder.Items.Item(i)
sentDate = Format(MyReceivedItem.SentOn, "mm/dd")
If sentDate = askDate Then
mySub = MyReceivedItem.Subject
MyReceivedItem.Move moveFolder
End If
Next i
'Sent Folder
outCount = outFolder.Items.Count
If outCount = 0 Then
MsgBox "There are no messages in the Sent Items folder.", vbInformation, _
"Sent Folder"
Exit Sub
End If
For j = outCount To 1 Step -1
Set MySentItem = outFolder.Items.Item(j)
sentDate = Format(MySentItem.SentOn, "mm/dd")
If sentDate = askDate Then
mySub = MySentItem.Subject
MySentItem.Move moveFolder
End If
Next j
Set oOutlookApp = Nothing
Set olNS = Nothing
Set moveFolder = Nothing
Set inFolder = Nothing
Set outFolder = Nothing
Set MyReceivedItem = Nothing
Set MySentItem = Nothing
End Sub