ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

¦p¦óÅã¥Ü½d³ò¤¤¥k¤U¨¤Àx¦s®æ¦ì¸m

¦^´_ 1# enoch
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Temp As Range
  4.     Set Temp = Range("A1:E10")
  5.     With Temp
  6.     'With Range("A1:E10")
  7.         MsgBox .Cells(1, 1).Address                             '¥k¤W¨¤
  8.         MsgBox .Cells(1, .Columns.Count).Address                '¥ª¤W¨¤
  9.         MsgBox .Cells(.Rows.Count, 1).Address                   '¥k¤U¨¤
  10.         MsgBox .Cells(.Rows.Count, .Columns.Count).Address      '¥ª¤U¨¤
  11.     End With
  12. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-2-4 16:37 ½s¿è

¦^´_ 3# enoch
.specialcells(xlcelltypelastcell) ¥i¥H¶Ç¦^«ü©w½d³ò³Ì ¤S¤U¨¤¶Ü ?  
µ¥¦P¶Ç¦^UsedRange½d³ò³Ì¥k¤U¨¤
  1. Sub Ex()
  2.     With ActiveSheet
  3.         MsgBox .Cells.SpecialCells(xlCellTypeLastCell).Address
  4.         With .UsedRange
  5.             MsgBox .Cells(.Rows.Count, .Columns.Count).Address
  6.         End With
  7.     End With
  8. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¤ß¤¤±`¦sµ½¸Ñ¡B¥]®e¡B·P«ä¡Bª¾¨¬¡B±¤ºÖ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD