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

µLªk±a¤J·Q­nªº­È

µLªk±a¤J·Q­nªº­È

Sub macro()
Machine1=100
Machine2=200
Machine3=300
For n = 1 To 3
Cells(n, 1)=machine & n
Next
End Sub
§Æ±æ±a¥X
A1=100
A2=200
A3=300
¥Ø«e¬O¥d¦bCells(n, 1)=machine & n¤£ª¾¹D¸Ó¦p¦ó¼g
YOYO

§ï¦¨¤U¦C»yªk¤£ª¾¬O§_¦X¾A
½Ð¸Õ¸Õ

Sub macro()
Machine1 = 100
Machine2 = 200
Machine3 = 300

x = Array(Machine1, Machine2, Machine3)
For n = 0 To 2
Cells(n + 1, 1) = x(n)
Next
End Sub

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-3-18 07:04 ½s¿è

¦^´_ 1# yanto913
2¼Óµ{¦¡½X¥i¥Î¦ý¥i ª½±µ¨Ï¥Î Array (°}¦C)
  1. Sub macro()
  2.     Dim Machine(1 To 3)  '«Å§iÅܼƬ°°}¦C,¨Ã³]©w°}¦Cªººû¼Æ.
  3.     Machine(1) = 100
  4.     Machine(2) = 200
  5.     Machine(3) = 300
  6.     For n = 1 To 3
  7.         Cells(n, 1) = Machine(n)
  8.     Next
  9. End Sub
½Æ»s¥N½X

TOP

·PÁ¤j®aªºÀ°§U¡A­ì¨Ó¦³¦U­Ó¤èªk¥i¥H¹F¨ì
¦ýÁÙ¬O±ÀGBKEE ª©¤j©Ò¼gªº
¦]¬°¹B¥Î¤ñ¸û¤è«K¡A¦]¬°°}¦C1¨ì50ªºÃe¤j±a¤J­È¥i¥Îfor to ..... next¸Ñ¨M¡A
¦Ó¥B¥Øªº¬O±NMachine(1)±a¤Jfor to ..... next(¤º§t¤j¶qµ{¦¡½X)¹Bºâ¤@¹M¡A«á¦AMachine(2)....Machine(50)¡A¤§«á¥u­n§ïMachine(1)=123¡AMachine(2)=412¡A.....Machine(50)=816¡A§Y¨Ï¦U­Ó¼Æ­È¤§¶¡¤£¦s¥ô¦óµ¥¤ñ©Îµ¥®tÃö«Y¤]¤ñ¸û¤è«K
Sub macro()
    Dim Machine(1 To 50)  '«Å§iÅܼƬ°°}¦C,¨Ã³]©w°}¦Cªººû¼Æ.
    Machine(1) = 123
    Machine(2) = 412
       .
       .
       .
    Machine(50) = 816
    For n = 1 To 50
        Cells(n, 1) = Machine(n)
       .
       .
       .
       .
    Next
End Sub
YOYO

TOP

        ÀR«ä¦Û¦b : ¤Ñ¤W³Ì¬ü¬O¬P¬P¡A¤H¥Í³Ì¬ü¬O·Å±¡¡C
ªð¦^¦Cªí ¤W¤@¥DÃD