OK. Here is your code, but I have used different names to try to indicate what each collection really is:

VB Code:
  1. Sub LookThroughFolder(ItemsInFolder)
  2. '
  3. ' Step through all items in the Folder
  4. '
  5.     For Each myitem In ItemsInFolder
  6.         'MsgBox "Looking at: " & myitem & ". In: " & myitem.Parent & " (" & thisFolder.Count & ")."
  7.         If myitem.Class = "43" Then
  8.                 For Each Attachment In myitem.Attachments
  9.                     '
  10.                     ' For any mail item (class 43) with an attachment, check its name
  11.                     '
  12.                     MsgBox "FOUND IN: " & myitem.Parent & " (IN: " & myitem.Parent.Parent & ")" & ". SUBJECT = " & myitem & ". ATTACHMENT = " & Attachment
  13.                 Next
  14.         End If
  15.     Next
  16. End Sub
  17.  
  18. Sub mylittletest()
  19. Dim MAPI As NameSpace
  20. Set MAPI = ThisOutlookSession.Application.GetNamespace("MAPI")
  21. Dim myitms As Items
  22. Set myitms = MAPI.GetDefaultFolder(olFolderInbox).Items
  23. MsgBox "Looking at: " & myitms.Parent & " (" & myitms.Count & " items)."
  24.  
  25. 'THIS NEXT LINE HAS CHANGED
  26. LookThroughFolder (myitms)
  27.  
  28. End Sub
The routine is expecting a collection of items in the folder; NOT the folder name itself. So instead of calling it with myItms.Parent, just use myItms.

If you want to change the routine to accept a folder name, then the first bit of the routine will need to include the statement (approximately):
ItemsInFolder = FolderName.Items