What does the Excel range.Rows property really do?

前端 未结 9 1848
故里飘歌
故里飘歌 2021-01-30 16:21

OK, I am finishing up an add-on project for a legacy Excel-VBA application, and I have once again run up against the conundrum of the mysterious range.Rows (?) and

9条回答
  •  感情败类
    2021-01-30 16:35

    I'm not sure, but I think the second parameter is a red herring.

    Both .Rows and .Columns take two optional parameters: RowIndex and ColumnIndex. Try to use ColumnIndex, e.g. Rows(ColumnIndex:=2), generates an error for both .Rows and .Columns.

    My feeling it's inherited in some sense from the Cells(RowIndex,ColumnIndex) Property but only the first parameter is appropriate.

提交回复
热议问题