运行时错误6:溢出Excel 2010

时间:2015-05-21 14:11:42

标签: excel excel-vba excel-2010 vba

我在Excel中有一个报告,它会从Access 2010中引入数据。当我运行它时,它会在numRecords = .Range(.Cells(2, 3), .Cells(2, 3).End(xlDown)).Count给我一个溢出错误。

Dim numRecords As Integer
    Dim row As Integer
    Dim numListed As Integer
    Dim col As Integer
    Dim deliveryMethod As String
    Dim col2 As Integer
    Dim numCol As Integer

With Worksheets("Raw Export")
    numRecords = .Range(.Cells(2, 3), .Cells(2, 3).End(xlDown)).Count
    numCol = .Range(.Cells(1, 1), .Cells(1, 3).End(xlToRight)).Count
End With

我尝试将numRecords更改为Long,但它只是移动了错误。任何提示都会很棒。

0 个答案:

没有答案