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

½Ð°ÝRangeªº¤å¦rµ¹¨ì°}¦C

½Ð°ÝRangeªº¤å¦rµ¹¨ì°}¦C

1.
    Dim Arr(1 to 5) as string «Å§i°}¦C«á
    ½Ð°Ý°£¤F¥Îloop°j°é¤@­Ó¤@­Óµ¹©w¥~ , ¦³¿ìªk¤@¦¸±N
    RangeÀx¦s®æªº¤º®e(¦p$A$1:$E$1)ªì©l¤Æµ¹°}¦C¶Ü?

2.
    ¦pªG§ï¥ÎVariantÅܼÆ
    Dim Arr as Variant
    Arr= Application.Transpose(Application.Transpose(Range("$A$1:$E$1")))
    Arr»Ý¤£»Ý­nÄÀ©ñ°O¾ÐÅé©O? «ç»òÁ٭쥦µ¹­È«eªºª¬ºA?

¦^´_ 1# stillfish00
Q 1ªºµª®×¦bQ2:  Arr= Application.Transpose(Application.Transpose(Range("$A$1:$E$1")))
Q2:»Ý¤£»Ý­nÄÀ©ñ°O¾ÐÅé©O?      ¦Û¦æ¨M©w
      «ç»òÁ٭쥦µ¹­È«eªºª¬ºA?    Erase ³¯­z¦¡ ­«·sªì©l¤Æ©T©w¤j¤p°}¦Cªº¤¸¯À¡A¨ÃÄÀ©ñ°ÊºA°}¦CªºÀx¦sªÅ¶¡
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Arr As Variant
  4.     Arr = Application.Transpose(Application.Transpose(Range("$A$1:$E$1")))
  5.     Erase Arr
  6. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# GBKEE
§Ú¥Î1·|¥X²{¿ù»~­C , ¦p¤U¹Ï

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-10-14 09:05 ½s¿è

¦^´_ 3# stillfish00
  1. Option Explicit
  2. Sub Ex() '¦³«ü©w°}¦Cªº¤¸¯À¼Æ¶·¤@¤@ªºµ¹­È
  3.     Dim Arr(1 To 5) As Variant, i As Integer
  4.     For i = 1 To 5
  5.         Arr(i) = Application.Transpose(Application.Transpose(Range("$A$1:$E$1").Columns(i)))        
  6.     Next
  7.     Erase Arr
  8. End Sub
  9. Sub Ex1() '°ÊºA°}¦C ¥i¥H ¤@¦¸µ¹©Ò¦³ªº­È
  10.     Dim Arr() As Variant  '<-> Dim Arr As Variant
  11.     Arr = Application.Transpose(Application.Transpose(Range("$A$1:$E$1")))
  12.     Erase Arr
  13. End Sub
½Æ»s¥N½X

TOP

¦^´_ 4# GBKEE
©ú¥Õ¤F , ·PÁª©¥D¦^À³

TOP

        ÀR«ä¦Û¦b : ¯àµ½¥Î®É¶¡ªº¤H¡A¥²¯à´x´¤¦Û¤v§V¤Oªº¤è¦V¡C
ªð¦^¦Cªí ¤W¤@¥DÃD