读取行和列的值
作者:互联网
iRows=activesheet.usedrange.rows.count
iColumns=activesheet.usedrange.Columns.count
'如果表格前面的几行或几列可能是空的,需要获得最下面的行数和最右面的列数:
with activesheet.usedrange
iEndRow=.rows.count+.row-1
iEndColumn=.Columns.count+.column-1
end with
'获取选中单元格的行列值
A = ActiveCell.Row
B = ActiveCell.Column
标签:count,rows,读取,行和列,activesheet,ActiveCell,Columns,usedrange 来源: https://www.cnblogs.com/jingxinmanong/p/12486354.html