Sub Main_13
Dim oRange As Object , oCursor As Object
oRange = ThisComponent.Sheets(2).getCellRangeByName("C1")
oCursor = ThisComponent.Sheets(2).createCursorByRange(oRange)
'
'以 collapseToCurrentRegion 範圍來取得
oCursor.collapseToCurrentRegion
Msgbox oCursor.getRows.Count
Msgbox oCursor.getColumns.Count
'
'以 gotoEndOfUsedArea 範圍來取得
oCursor.gotoEndOfUsedArea(true)
Msgbox oCursor.getRows.Count
Msgbox oCursor.getColumns.Count
end sub
沒有留言:
張貼留言