Why do I get an invalid property value on this line?

VB Code:
  1. pbrProgress.Value = pbrProgress.Value + thisFile.Size

thisFile is dimmed as a File.

Here's the whole function in case.

VB Code:
  1. Sub ScanFolder(FolderSpec)
  2.     Dim thisFolder As Folder
  3.     Dim allFolders As Folders
  4.     Dim thisFile As File
  5.     Dim allFiles As Files
  6.     Dim TotalCDSize As Long
  7.     Dim i As Integer
  8.     Dim x As Integer
  9.     Dim rs As ADODB.Recordset
  10.     Set rs = New ADODB.Recordset
  11.     Set fso = New FileSystemObject
  12.     rs.Open dtaVolumes.RecordSource, dtaVolumes.ConnectionString, adOpenKeyset, adLockOptimistic
  13.     Set thisFolder = fso.GetFolder(FolderSpec)
  14.     Set allFolders = thisFolder.SubFolders
  15.     For Each thisFolder In allFolders
  16.         If (thisFolder.Attributes And Hidden) <> Hidden Then
  17.             Set allFiles = thisFolder.Files
  18.             If allFiles.Count > 0 Then
  19.                 For Each thisFile In allFiles
  20.                     TotalCDSize = TotalCDSize + thisFile.Size
  21.                 Next
  22.                 pbrProgress.Max = TotalCDSize
  23.                 For Each thisFile In allFiles
  24.                     rs.AddNew
  25.                     rs!Files = thisFile.Name
  26.                     pbrProgress.Value = pbrProgress.Value + thisFile.Size
  27.                 Next
  28.             End If
  29.             Set allFiles = Nothing
  30.             ScanFolder thisFolder.Path
  31.         End If
  32.         DoEvents
  33.     Next
  34.     Set thisFolder = Nothing
  35.     Set allFolders = Nothing
  36.     Set rs = Nothing
  37.     Set fso = Nothing
  38.     Exit Sub
  39.     Unload Me
  40. End Sub