我想遍历一列中的所有值。我的专栏只有17个值。但它指出行号为1048756
Range("A1", Range("A1").End(xlDown)).Rows.Count
-此方法返回错误的值
Windows("Sheet1.xlsx").Activate
Dim x As Integer
Dim y As Integer
Dim a As Integer
Dim b As Integer
a = 2
b = 1
NumRows = Range("A1", Range("A1").End(xlDown)).Rows.Count
Numcols = Range("A1", Range("A1").End(xlToRight)).Columns.Count
MsgBox NumRows
For x = 2 To NumRows
b = 1
For y = 1 To Numcols
NumRows显示1048756。在For x=2
行,是说
运行时错误6。