Listing 2: The GetRestrictDate() Function NONEXECUTABLE Function GetRestrictDate(strFolderName As String) As String Dim strMsg As String Dim strTitle As String Dim strResponse As String ' build prompts strMsg = "Purge items that end before what date? " & _ vbCrLf & vbCrLf & _ "(Leave blank to purge all items from the folder.)" strTitle = "Purge the " & strFolderName & " folder" ' display input box strResponse = InputBox(strMsg, strTitle) If strResponse = "" Or IsDate(strResponse) Then GetRestrictDate = strResponse Else strResponse = GetRestrictDate(strFolderName) End If End Function