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

[µo°Ý] Â^¨úLISTBOX·í¤¤ªº¤å¦r

[µo°Ý] Â^¨úLISTBOX·í¤¤ªº¤å¦r

°²³]§ÚªºLISTBOXªº­È¬° AÄæ¦ì(­û¤u½s¸¹) ¤Î BÄæ¦ì(­û¤u©m¦W)©Ò²Õ¦¨

·í§Ú¿ï¨úLISTBOX¨ä¤¤¤@­Ó­ÈÅã¥Ü¬° " 80523 §õ¤j¤¯ "

«áÄò­n°µ¨ä¥L°Ê§@®É¡A¬O§_¦³¿ìªk¥uÂ^¨ú¥X"80523"¤T­Ó¦r©O¡H©Î¬O"§õ¤j¤H"¡C

(­û¤u½s¸¹¥i¯à5¦ì¼Æ~6¦ì¼Æ) (©m¦W¤]¥i¯à2~4­Ó¦r)

¦^´_ 1# lifedidi

Private Sub ListBox1_Change()
With ListBox1
MsgBox "²Ä¤@Äæ" & .List(.ListIndex, 0)
MsgBox "²Ä¤GÄæ" & .List(.ListIndex, 1)
End With
End Sub
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

Hsieh ¤j®v ±z¦n
·PÁ±zªº¦^ÂСA§Ú¹Á¸Õ¤F´X¦¸¡A¸ê®Æ¤´µMµLªk¤À¶}¡A
À³¸Ó¬O§Ú½s¼gªº¤è¦¡¦³°ÝÃD¡A§Ú¬O¥ÎListBox1.AddItem AÄæ & BÄæ¡A¬O§_¬O­n¥Î¨ä¥L¤è¦¡?
¦A¦V±z½Ð±Ð¡Aªþ¤WÀɮסAÁÂÁ¡I

¥t¥~­l¦ù¤@­Ó°ÝÃD¡ALISTBOX¬O§_¥i¥H¥´¶}USERFORM®É¡A¦Û°Ê¿ï¾Ü²Ä¤@Äæ¦ì¡A¤£µMLISTBOX¨S¦³¿ï¾Ü¶µ¥Ø®É¡A¾Þ§@¤U¥h·|Åã¥Ü«¬ºA¤£²Å¦X¡AÁÂÁ¡I

LISTBOX.zip (20.53 KB)

TOP

¦^´_ 3# lifedidi

Q1¡G½Ð±NCommandButton1_Click¨Æ¥óµ{§Ç§ï¬°¦p¤U¸Õ¸Õ¬Ý¡C

Private Sub CommandButton1_Click()
    With ListBox1
        MsgBox "½s¸¹¡G" & Split(.Value, " ")(0)
        MsgBox "©m¦W¡G" & Split(.Value, " ")(1)
    End With
End Sub

Q2¡G©óUserForm_Initialize¨Æ¥óµ{§Ç«á­±¥[¤J©³¤U¨â¦æ¡C
ListBox1.ListIndex = 0
ListBox2.ListIndex = 0

TOP

Kubi ¤j®v ±z¦n
·PÁ±zªºÀ°¦£~~~ °ÝÃD¸Ñ¨M¤F ÁÂÁ¡I

TOP

¦U¦ì¥ý¶i¡A¤£¦n·N«ä¡A

§Ú°õ¦æ¤Fµ{¦¡½X

ListBox1.ListIndex = 0

Msgbox Listbox1.Value

¥L§ì¥X¨Óªº­È¬O"" §ì¤£¨ì²Ä¤@­Ó¶µ¥Ø

¦ý¬O¦³®É­Ô¤S¥i¥H§ìªº¨ì¡A½Ð°Ý¬O¤°»ò­ì¦]©O¡H

TOP

¦U¦ì¥ý¶i±z¦n¡G

ªþ¤W´ú¸ÕÀɮסA¤U¹Ï¬O­n§ì¨úAFJ ¦ý¬O¥u§ì¨ú¨ìAF¡A



LISTBOX_20180226.zip (20.23 KB)

TOP

¦^´_ 7# lifedidi
µ¹¾nÂI
  1. Private Sub CommandButton2_Click()

  2. ListBox1.ListIndex = 0
  3. ListBox2.ListIndex = 1
  4. ListBox3.ListIndex = 0
  5. ListBox4.ListIndex = 3
  6. ListBox5.ListIndex = 2
  7. ListBox5.SetFocus
  8. MsgBox ListBox1.Value & ListBox2.Value & ListBox3.Value & ListBox4.Value & ListBox5.Text

  9. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

Hsieh ¤j®v ±z¦n

¾Ç²ß¨ì¤F¡I·PÁ±zªº«ü¾É¡AÁÂÁ¡I

TOP

        ÀR«ä¦Û¦b : ÀR§¤±`®¦¤v¹L¡B¶¢½Í²ö½×¤H«D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD