VBA程序使用时报错

问题遇到的现象和发生背景

在跑公司已做好的VBA tool时,出现以下报错信息:

img

问题相关代码,请勿粘贴截图

以下是前后的代码
'fill in the data from financial costing data

With Workbooks(mfile)

   
brr = .Sheets(1).Range("b2:b" & n).Value

For i = 1 To n - 1
    If fs.exists(brr(i, 1)) Then
       .Sheets(1).Cells(i + 1, 8) = ff(brr(i, 1))
       .Sheets(1).Cells(i + 1, 9) = fs(brr(i, 1))
       .Sheets(1).Cells(i + 1, 10) = Trim(fos(brr(i, 1)))
       .Sheets(1).Cells(i + 1, 11) = DateSerial(Year(Date), Month(Date), 0) - CDate(.Sheets(1).Cells(i + 1, 10))
       Select Case .Sheets(1).Cells(i + 1, 11)
              Case Is < 90
                   .Sheets(1).Cells(i + 1, 12) = "<3Month"
              Case Is < 180
                   .Sheets(1).Cells(i + 1, 12) = "3-6Month"
              Case Is < 360
                   .Sheets(1).Cells(i + 1, 12) = "6-12Month"
              Case Is < 540
                   .Sheets(1).Cells(i + 1, 12) = "12-18Month"
              Case Is < 720
                   .Sheets(1).Cells(i + 1, 12) = "18-24Month"
              Case Else
                   .Sheets(1).Cells(i + 1, 12) = ">24Month"
       End Select
        
    End If
运行结果及报错内容

debug之后,出现如下标黄信息:

img

我的解答思路和尝试过的方法

我没有学过VBA,是在用别人写好的程序。

我想要达到的结果

希望能搞清楚报错的原因和怎样处理才能顺利把报表跑出来

项目的变量属性没有被设置