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

[µo°Ý] ÅܼƤ¤ªº¼Æ¦r¦A¥Î¥t¤@­ÓÅܼƪí¥Üªº¤èªk

[µo°Ý] ÅܼƤ¤ªº¼Æ¦r¦A¥Î¥t¤@­ÓÅܼƪí¥Üªº¤èªk

¦p¤UªºVBA¡A§Ú§Æ±æ¥X²{¤T­Ómsgbox¤À§OÅã¥Ü  AA , BB , CC
¦ý¬O§Ú·Q­n§â a1 , a2 , a3 ¤¤ªº¼Æ¦r³¡¤À¥Î For °j°éªº i = 1 To 3 ¨Ó¨ú¥N
½Ð°Ý MsgBox«á­±ªº¨º¤@¦ê¡A¸Ó¦p¦óªí¥Ü©O?
·P¿E¤£ºÉ!!
  1. Sub test()
  2. a1 = "AA"
  3. a2 = "BB"
  4. a3 = "CC"

  5. For i = 1 To 3
  6. MsgBox ?????????????
  7. Next
  8. End Sub
½Æ»s¥N½X

¦^´_ 1# sweetkitty
¥Î°}¦C
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Ar(1 To 3), i As Integer
  4.     Ar(1) = "AA"
  5.     Ar(2) = "BB"
  6.     Ar(3) = "CC"
  7.     For i = 1 To 3
  8.         MsgBox Ar(i)
  9.     Next
  10. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# GBKEE


¦n°ª¯ÅªºªF¦è³á @@  ±q¨Ó¨S¨Ï¥Î¹L³oºØ¤èªk
·P¿E¤£ºÉ!  ¾Ç¨ì·sªF¦è¤F ^^

TOP

¦^´_ 2# GBKEE

¤£¦n·N«ä~ §ó¶i¤@¨Bªº½Ð°Ý:
¦pªG³o­Ó°}¦Cªº¤j¤p¤£¬O©w¼Æ¡A¦Ó¬O­n¦b«e­±¥Î¨ä¥L¤è¦¡ºâ¥X³o­Ó­È¡A§Ú§â¥¦³]¦¨ÅܼÆk¥N¶i°}¦C¤¤
¥L·|¥X²{°w¹ï"Dim Ar(1 To k)" ¤¤ªº "k"¡A"¥²¶·¬O±`¼Æ¹Bºâ¦¡"ªºµøµ¡
½Ð°Ý¸Ó«ç»ò³B²z? ·PÁ ^^

Sub Ex()
    k=3
    Dim Ar(1 To k), i As Integer
    Ar(1) = "AA"
    Ar(2) = "BB"
    Ar(3) = "CC"
    For i = 1 To 3
        MsgBox Ar(i)
    Next
End Sub

TOP

¦^´_ 4# sweetkitty
  1. Option Explicit
  2. Sub Ex()
  3.     Dim i As Integer, k As Integer
  4.     k = 2
  5.     ReDim Ar(0 To k)   'ReDim :­«·s«Å§i°}¦C
  6.     Ar(0) = "AA"
  7.     Ar(1) = "BB"
  8.     Ar(2) = "CC"
  9.     For i = 0 To k
  10.         MsgBox Ar(i)
  11.     Next
  12. End Sub
½Æ»s¥N½X

TOP

¦^´_ 5# GBKEE

·PÁÂ!! ÁöµM·d¤£À´¬°¤°»ò³o¼Ë´N¥i¥H¤F QQ
µ{¦¡¯u¬O¯«©_ªºªF¦èªü

TOP

        ÀR«ä¦Û¦b : ¯à·F¤£·F¡A¤£¦p­W·F¹ê·F¡C
ªð¦^¦Cªí ¤W¤@¥DÃD