½Ð±ÐUserForm±a¤J¤Þ¼Æ»P±a¥X¤Þ¼Æªº°ÝÃD
- ©«¤l
- 132
- ¥DÃD
- 31
- ºëµØ
- 0
- ¿n¤À
- 167
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- Office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Taipei
- µù¥U®É¶¡
- 2011-4-14
- ³Ì«áµn¿ý
- 2024-2-28
|
½Ð±ÐUserForm±a¤J¤Þ¼Æ»P±a¥X¤Þ¼Æªº°ÝÃD
½Ð±Ð¦U¦ì¤j¤j¡G
¤pªº§ÚÀ|¸Õ§@¤F¤@ÓUserForm, ¸Ì±¦³¤@ÓListBox, ¤@ÓCommandButton
·Q»¡¯à§_¦bUserForm.Show®É¯à¦P®É¸ü¤J¤@ÓName_AR() as variant¡AÅý³oÓ¤º®eÈˤJListBox¡A¿ï¨ú§¹²¦«á¡A«ö¤UCommandButton«á¯à±a¥X¤@ÓOutput_AR() as variant¡AÅý§Úª¾¹D¦³¨º¨Ç³Q¿ï¨ú¨ì¡A
¸ü¤J§Ú§ä¨ì¥i¨Ï¥Î
Public Property Let Value(Data_AR() as variant)
¨Ó³B²z¡A¦ý¬O¸ü¥X®É¡AÁöµM¤]¥i¥H¥Î
Public Property Get Value() as Variant
¦ý¬O§ä¤£¨ì¦nªº®É¶¡ÂI¨Ó°µ³oÓ¡A¤£ª¾¹D¦U¦ì«e½ú¯à¤£¯àµ¹§Ú¤@¨Ç«Øij©O¡H·PÁ±z¡C |
|
clio
|
|
|
|
|
- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
¦^´_ 1# clio
³q±`©I¥sªí³æ´N¬O¦b¤@¯ë¼Ò²Õ©I¥s
Load Userform1
©M
Userform1.Show
¦pªGn¶Ç¤@¨Çªì©l¤Æªº¸ê®Æµ¹ªí³æ¡A¥i¦bªí³æµ{¦¡½X·s¼W¦pSub InitForm(arInput)- Public Sub InitForm(arInput)
- ListBox1.List = arInput
- End Sub
½Æ»s¥N½X ¤@¯ë¼Ò²ÕShow¤§«e©I¥sInitForm¶Ç»¼µ¹ªí³æ- Sub Test()
- Dim ar
- ar = Array("A", "B", "C")
-
- Load UserForm2
- UserForm2.InitForm ar
- UserForm2.Show
- End Sub
½Æ»s¥N½X Userform «ö¶s«á¨ú±o¤w¿ï¶µ¥Ø- Private Sub CommandButton1_Click()
- Dim Output_AR(1 To ListBox1.Count)
- Dim i As Integer, cnt As Integer
-
- For i = 1 To ListBox1.ListCount
- If ListBox1.Selected(i) Then
- cnt = cnt + 1
- Output_AR(cnt) = ListBox1.List(i)
- End If
- Next
- If cnt > 0 Then
- ReDim Preserve Output_AR(1 To cnt)
- '¦Ü¦¹ Output_AR ¤w¨ú±o¿ï¾Üªº¶µ¥Ø
- End If
- End Sub
½Æ»s¥N½X |
|
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C
|
|
|
|
|
- ©«¤l
- 132
- ¥DÃD
- 31
- ºëµØ
- 0
- ¿n¤À
- 167
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- Office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Taipei
- µù¥U®É¶¡
- 2011-4-14
- ³Ì«áµn¿ý
- 2024-2-28
|
¦^´_ 2# stillfish00
¬Oªº¡A³o¼Ë¼g½T¹ê¨S¦³¿ù¡A¦ý¬O§Ún«ç»ò§âOutput_AR¥ÑUserForm°e¥X¨Ó¨ìFunction¤º¨Ó©O¡H
³oÂIÅý§Ú·Q¤£¥X¨Ó |
|
clio
|
|
|
|
|
- ©«¤l
- 132
- ¥DÃD
- 31
- ºëµØ
- 0
- ¿n¤À
- 167
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- Office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Taipei
- µù¥U®É¶¡
- 2011-4-14
- ³Ì«áµn¿ý
- 2024-2-28
|
jackyq«e½ú¡G
·PÁ±zªº¦^ÂСA¥Ñ©ó§ÚÅv¤£¨¬¡A¦pªk¨p°T±z¡A¨S¦³¸g¹L©pªº¦P·N¡A§Ú¤]¤£´±§â©pªº¤èªkPO¥X¨Ó
·Ó±z»¡ªº¤èªk¡A¨ºOutput_AR´Nn³]¦¨¥þ°Ï°ìÅܼơA¤~¯à°µ¨ì¡A¬O¶Ü¡H |
|
clio
|
|
|
|
|
- ©«¤l
- 319
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 309
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- 2k
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-6-24
- ³Ì«áµn¿ý
- 2024-4-27
|
¤£, ¨º¬O«Ü´¶³qªº¤èªk
¨ä¥L¤j¤j³£·|
§Ú±`·d¯QÀs¤~¨p¤U¸ò§A»¡
¦Ñ¹ê»¡
¤j¤j¨S¦³§â°ÝÃDªí¹F²M·¡
¤£µM¨ä¥L¤j¤j¦´N§iª¾§A¼gªk
§Ú¤]¥u¬O²qªº, §A·Q·F³Â
§A¬O¤£¬O·Q±q Sheet1 or Sheet2 ... ¥~³¡¥h±±¨î¨ºÓ UserForm1
·í¬Y¬Y¨Ï¥ÎªÌ«ö¤U UserForm1 ¤Wªº CommandButton «á
§A§Æ±æ¯à±q Sheet1 §ì¨ì¨ºÓ¨Ï¥ÎªÌªº Listbox ¤Wªº¿ï¨ú¶µ¥Ø ?
¦pªG¬O Output_AR ¤£¥Î³]¦¨¥þ°Ï°ìÅÜ¼Æ |
|
|
|
|
|
|
- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
¦^´_ 3# clio
§Aªº·N«ä¬O·Q¦A§âOutput_AR¶Ç¦^Test¤º?
³q±`§Ú¬O¤£·|¦A¶Ç¦^Test°Õ¡A¬JµM§Ú¤w¸g¦³Output_AR¡A¦pªG§Ún°µ¬Æ»ò¤ÀªR©Î³B²z¡A´N¦bClick¤º©I¥s§Ún³B²zªºFunction ¨Ã§âOutput_AR¶Ç¨ì§Ún³B²zªºFunction¤º¤£´N¦n¤F?
°í«ùn¶Ç¦^Testªº¸Ü¡A´N¦b¤@¯ë¼Ò²Õ«Å§i¤@Ó¼Ò²Õ¼h¦¸ªº¤½¥Î(Public)ÅܼơA«e±ªºOutput_AR³£§ï¦¨ª½±µ¥Î³oÓ¤½¥ÎÅܼơA³o¼ËTest¤º¤]¯à¬Ý¨ì³oÓÅܼƴN¤£¥Î¶Ç¤F¡C
¤£¹L¡A§An¥ýª`·Nªº¬O¹w³]ªºªí³æ¡A·í§A©I¥sUserForm2.Show«á¡Aªí³æÅã¥Ü¥X¨Ó¡Aµ{¦¡·|°±¯d¦b¸Ó¦æ¡A·|¤@ª½µ¥¨ìªí³æÃö³¬¤~·|¸õ¨ì¤U¤@¦æ¡C
°Ýªº¤£°÷©ú½T§Ú¤]¥u¯à³o¼Ë¦^µª°Õ¡C |
|
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C
|
|
|
|
|
- ©«¤l
- 132
- ¥DÃD
- 31
- ºëµØ
- 0
- ¿n¤À
- 167
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- Office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Taipei
- µù¥U®É¶¡
- 2011-4-14
- ³Ì«áµn¿ý
- 2024-2-28
|
¦^´_ 6# stillfish00
·PÁ«e½úªº¦^ÂСA¦]¬°§Ú¬Onµ¹¤@¦ê¤H¦W¡AÅý¨Ï¥ÎªÌ¤Ä¿ï±¼¤£nªº¤H¡A©Ò¥H§Ú¤~·|»Ýn¦A§âµ²ªG¶Ç¦^¡A¦nÅýµ{¦¡±µ¤U¥h³B²z³o¨Ç¤Hªº«áÄò°Ê§@¡A³o¼Ë¬Ý°_¨Ó¥Î¤½¥ÎÅܼƬO¤ñ¸û¦nªº¿ï¾Ü¡A·PÁ±zªº¦^ÂСAÁÂÁ |
|
clio
|
|
|
|
|
- ©«¤l
- 132
- ¥DÃD
- 31
- ºëµØ
- 0
- ¿n¤À
- 167
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- Office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Taipei
- µù¥U®É¶¡
- 2011-4-14
- ³Ì«áµn¿ý
- 2024-2-28
|
¦^´_ 5# jackyq
·PÁ¤j¤j¡A§Ú¤jP¤W¬On°µ³o¥ó¨Æ¡A§ÚªºOutlook¦³«Ü¦hÓMail ¸s²Õ¡A¨C¤@Ó¸s²Õ¸Ì±ªº¤H¼Æ¤£¦P¡A·í§Ú·s¼W¤@Ó¤H®É¡A§Ú·|±N¥L§@¤ÀÃþ¡A¨Ì¾Ú¥Lªº¤ÀÃþ¨ì¨ì¦U§Oªº¸s²Õ¤º¡A¦ý¬On¬O¦³¦P¤@®a¤½¥qªº¤H¡A§Ú«h§Æ±æ¸õ¥X¤@Ó²M³æ¡AÅý§Ú¤Ä¿ï±¼¡A¤£nªº¤H¡A©Ò¥H§Ú¤~»Ýn¦³¶Ç¦^È¡A¦nÅý§Úª¾¹D¨º¨Ç¤H¸Ó±q¸s²Õ¤º§R±¼¡A¤£ª¾¹D§Ú³o¼Ë»¡©ú¬O§_²M·¡¡A·PÁ±z |
|
clio
|
|
|
|
|