types不匹配错误(vba)

在这部分代码的最后一行中,我得到types不匹配错误:

Dim test As Object Set test = Mid(Trim(row.Cells(1, 19).Value), 9, 1) Mod 2 

我该如何解决?

VBA中没有types层次结构, Object是对象实例,不能保存原始types。

使用一个Long

 Dim test As long test = Mid(Trim(row.Cells(1, 19).Value), 9, 1) Mod 2