- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-11-8 08:33 ½s¿è
¦^´_ 12# c_c_lai - Option Base ³¯z¦¡
- ¦b¼Ò²Õ¼h¦¸¤¤¥Î¨Ó«Å§i°}¦C¯Á¤Þªº¹w³]¤U¡C
- »yªk
- Option Base {0 | 1}
- ½Ðª`·N
- Y¹w³]ªº¤UȬ° 0¡A«h Option Base ³¯z¦¡¬O¤£»Ýnªº¡CY»Ýn¨Ï¥Î®É¡A¦¹³¯z¦¡¥²¶·¥X²{¦b¼Ò²Õ¤¤¡A¨Ã¥B¦b¥ô¦óµ{§Ç¤§«e¡COption Base ¶È¯à¦b¼Ò²ÕùØ¥X²{¤@¦¸¡A¦Ó¥B¥²¶·¦b§t¦³ºû¼Æªº°}¦C«Å§i¤§«e¡C
- ªþµù ¦b Dim¡BPrivate¡BPublic¡BReDim ©M Static ³¯z¦¡¤¤¡ATo ¤l¥y´£¨Ñ¸û¨ã¼u©Êªº¤èªk¡A¨Ó±±¨î°}¦C¯Á¤Þªº½d³ò¡CµM¦Ó¡A¦pªG¤£¨Ï¥Î To ¤l¥y¨Ó©ú½Tªº³]©w¤U¡A«h¥i¥Î Option Base ¨Ó§ïÅܹw³]Ȫº¤U¬° 1¡CArray ¨ç¼Æ©Ò«Ø¥ßªº°}¦C¹w³]¤U¥²¬°¹s¡A¤£¨ü Option Base ©Ò¼vÅT¡C
- Option Base ³¯z¦¡¥u¼vÅT¥¦©Ò¦bªº¼Ò²Õùؤ§°}¦Cªº¤U¡C
½Æ»s¥N½X- Option Explicit
- Sub test()
- Dim arr, i As Integer
- Sheets("±ÄÁÊ°O¿ý").UsedRange.Offset(1).Clear
- With Sheets("±ÄÁʳæ")
- For i = 10 To .[B30].End(xlUp).Row
- arr = Array(.[B5], .[D5].Text, .[J5], .[B6] & .[c6], .Cells(i, "B"), .Cells(i, "D"), .Cells(i, "E"), .Cells(i, "F"), .Cells(i, "G"), .Cells(i, "H"), .Cells(i, "I"), .Cells(i, "J"))
- Sheets("±ÄÁÊ°O¿ý").Cells([A65536].End(3).Row + 1, 1).Resize(1, UBound(arr) + 1) = arr
- Next
- End With
- End Sub
½Æ»s¥N½X |
|