UsedRange.Count counting wrong

后端 未结 3 1949
陌清茗
陌清茗 2020-12-18 05:43

Summary: I\'m taking a row of data from one sheet and pasting it into another, however the sheet would be a daily use kind of thing where new data is just e

3条回答
  •  攒了一身酷
    2020-12-18 06:21

    This two line do the magic

      usedCol = ThisWorkbook.ActiveSheet.UsedRange.SpecialCells(xlCellTypeLastCell).Column
      usedRow = ThisWorkbook.ActiveSheet.UsedRange.SpecialCells(xlCellTypeLastCell).Row
    

    For more info visit Microsoft's site

    http://msdn.microsoft.com/en-us/library/office/ff196157.aspx

提交回复
热议问题