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

[µo°Ý] ¦p¦ó±q¤Tºû°}¦CÂ^¨ú¨C¤@¼h¤Gºû¸ê®Æ¶K¨ìsheet¸Ì¡H½Ð¦U¦ì«e½ú«ü±Ð¡ã

[µo°Ý] ¦p¦ó±q¤Tºû°}¦CÂ^¨ú¨C¤@¼h¤Gºû¸ê®Æ¶K¨ìsheet¸Ì¡H½Ð¦U¦ì«e½ú«ü±Ð¡ã

¦U¦ì«e½ú­Ì¤j®a¦n¡A

¤wª¾¹D¦s¦bªº¤Gºû°}¦C(dAr)¤¤­Y­nÂ^¨ú¬Y¤@ºû«×ªº¸ê®Æ¥i¥H¨Ï¥Î application.index(dAr,0,1) ©ÎªÌ  application.index(dAr,1,0) ªº¤è¦¡©â¥X¸ê®Æ

¦ý¦pªG¬O¦s¦b¤Tºû°}¦C(Ar)¤¤¡A ¦p¦ó§â¨C¤@¼hªº¤Gºû¸ê®Æ©â¥X¨Ó¡A©ñ¨ì¦U§Oªºsheet¸Ì­±¡C?
Àµ½Ð¦U¦ì«e½ú­Ì»P°ª¤â­Ì«ü¾É¡A·PÁ¡C
  1. Sub Ex()
  2. Dim Ar, z, x, y
  3. ReDim Ar(1 To 3, 1 To 3, 1 To 3)
  4. For z = 1 To 3
  5.    For x = 1 To 3
  6.           For y = 1 To 3
  7.                 Ar(z, x, y) = z * x * y
  8.             Next k
  9.     Next j
  10. Next i
  11. For z = 1 To 3
  12. worksheets(z).[a1].resize(3,3)= ???????
  13. Next z
  14. End Sub
½Æ»s¥N½X

¦U¦ì«e½ú­Ì¤j®a¦n¡A

¤wª¾¹D¦s¦bªº¤Gºû°}¦C(dAr)¤¤­Y­nÂ^¨ú¬Y¤@ºû«×ªº¸ê®Æ¥i¥H¨Ï¥Î application.index(dA ...
justintoolbox µoªí©ó 2015-8-13 11:18


©êºp ¡A«e­±¥N½X¦³¨Ç¿ù»~¡A¥N½X­×¥¿¦p¤U
  1. Sub Ex()
  2. Dim Ar, z, x, y
  3. ReDim Ar(1 To 3, 1 To 3, 1 To 3)
  4. For z = 1 To 3
  5.    For x = 1 To 3
  6.           For y = 1 To 3
  7.                 Ar(z, x, y) = z * x * y
  8.             Next y
  9.     Next x
  10. Next z
  11. For z = 1 To 3
  12. worksheets(z).[a1].resize(3,3)= ???????
  13. Next z
  14. End Sub
½Æ»s¥N½X

TOP

index ¤£¤ä´©3ºû, ¬Ý¨Ó­n´`Àô¤F¡C

Sub Ex()
Dim Ar, z, x, y, ar3
ReDim Ar(1 To 3, 1 To 3, 1 To 3)
For z = 1 To 3
   For x = 1 To 3
          For y = 1 To 3
                Ar(z, x, y) = z * x * y
            Next y
    Next x
Next z
ReDim ar3(1 To UBound(Ar), 1 To UBound(Ar, 2))
For z = 1 To UBound(Ar)
    For x = 1 To UBound(Ar, 2)
        For y = 1 To UBound(Ar, 3)
            ar3(x, y) = Ar(z, x, y)
        Next
    Next
Worksheets(z).[a1].Resize(UBound(Ar), UBound(Ar, 2)) = ar3
Next
End Sub

TOP

index ¤£¤ä´©3ºû, ¬Ý¨Ó­n´`Àô¤F¡C

Sub Ex()
Dim Ar, z, x, y, ar3
ReDim Ar(1 To 3, 1 To 3, 1 To 3)
...
ikboy µoªí©ó 2015-8-13 16:22


¤Ó·PÁÂikboy«üÂI¡I

³o¤èªk«D±`¦n¡]±N3ºû°}¦Cªº¬Y¤@¼h¸ê®ÆŪ¥X¦Ü·s«Øªº2ºû°}¦C¡A¦A§â2ºû°}¦C¶K¨ìsheet¸Ì­±)¡I

«D±`·PÁ§A¡ã

TOP

¤Ó·PÁÂikboy«üÂI¡I

³o¤èªk«D±`¦n¡]±N3ºû°}¦Cªº¬Y¤@¼h¸ê®ÆŪ¥X¦Ü·s«Øªº2ºû°}¦C¡A¦A§â2ºû°}¦C¶K¨ìshee ...
justintoolbox µoªí©ó 2015-8-14 06:45


½Ð±Ð¦U¦ì°ª¤â»P«e½ú­Ì¡A°£¤F¨Ï¥Î¦^°é¤è¦¡(¦n¤èªk¤§¤@)¡A

¬O§_ÁÙ¦³¨ä¥Lªº¤èªk¯àª½±µÅª¨ú3ºû°}¦C¤¤¬Y¤@¼hªº2ºû°}¦C¸ê®Æ¡H(¦n¤èªk¤§¤G¡H¡I)

TOP

        ÀR«ä¦Û¦b : ¤f»¡¦n¸Ü¡B¤ß·Q¦n·N¡B¨­¦æ¦n¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD