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

[µo°Ý] ¦U¦ì¥ý¶i¤j®a¦n¡A³o¦¸¦³¥t¥~ªº°ÝÃD

[µo°Ý] ¦U¦ì¥ý¶i¤j®a¦n¡A³o¦¸¦³¥t¥~ªº°ÝÃD

¦U¦ì¤j¤j¦n¡A¥H¤U¬O§Ú¨ìºô¸ô¤W§ä¨ì¨ä¥L¤H³]­pªº¤U©Ô¦¡¿ï³æ

§Úª¾¹Dª©¤W¤w¸g¦³³\¦h¬ÛÃöªº°Q½×¤F¡A§Ú¤]³£¬Ý¹L¤F¡A¦ý«oÅý§Ú·d±o§ó²V¶Ã@_@

§Úªº°ÝÃD¬O¡A¦p¦ó¦bªí³æ¤¤©Ò«Ø¥ßªº¤U©Ô¦¡¿ï³æ(ComboBox)¤¤¡A¤Þ¤J²Ä¤G­Ó¤u§@ªíªº¸ê®Æ¡A¨Ã¥B¥X²{¸ê®Æ¿ï¶µ¡A¿ï¾Ü§¹¦¨«á¿é¤J¦b²Ä¤@­Ó¤u§@ªíªºªí®æ¤¤

ªþÀɬO³o¦ì¤j¤j©Ò³]­pªº¡A¨Ã¥B¨ã¦³§Ú©ÒÁ¿ªº¥\¯à

¦ý¬O§Ú§¹¥þ¬Ý¤£À´¥L¦bµ{¦¡½X¸Ì¼g¤F¤°»ò¡A¤]¨S¦³´£¨ì¤u§@ªí2¡A«o¹F¨ì³o¼Ëªº®ÄªG

©Ò¥H·Q½Ð±Ð¦U¦ì«üÂI¤@¤U°g¬z

ÁÙ¬O§Ú­þ¸Ì¬Ýº|±¼¤F~

ÁÂÁ¦U¦ì¤F
Combobox ¤G¼h¤U©Ô¿ï³æ.rar (14.98 KB)
  1. Private Sub ComboBox1_Change()
  2.     With UserForm1
  3.         IT = "¼Ò¨ã½s¸¹" & .ComboBox1.Value
  4.         .ComboBox2.RowSource = Names(IT)
  5.         .ComboBox2.ListIndex = 0
  6.         .CommandButton2.SetFocus
  7.     End With
  8. End Sub

  9. Private Sub ComboBox2_Change()
  10.     UserForm1.CommandButton2.SetFocus
  11. End Sub

  12. Private Sub CommandButton1_Click()
  13.     r = [a65536].End(3).Row + 1
  14.     Cells(r, 1).Value = ComboBox1.Value
  15.     Cells(r, 2).Value = ComboBox2.Value
  16. End Sub

  17. Private Sub CommandButton2_Click()
  18.     Unload UserForm1
  19. End Sub



  20. Private Sub UserForm_Initialize()
  21.     With UserForm1
  22.         .ComboBox1.RowSource = Names("¾÷¥x")
  23.         .ComboBox1.ListIndex = 0
  24.         .CommandButton2.SetFocus
  25.     End With
  26. End Sub
½Æ»s¥N½X

¦^´_ 1# wxad0285


   
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ c_c_lai ©ó 2013-10-21 17:37 ½s¿è

¦^´_ 1# wxad0285
¥H¤U¬O§A­ì¥»ªº«ä¸ô (¥¼¨Ï¥Î "¤½¦¡->¦WºÙºÞ²z­û " (2010)  ¡F "´¡¤J->©w¸q¦WºÙ" (2003))¡G
  1. Private Sub ComboBox1_Change()
  2.     With UserForm1
  3.         '  IT = "¼Ò¨ã½s¸¹" & .ComboBox1.Value
  4.         '  .ComboBox2.RowSource = Names(IT)
  5.         .ComboBox2.RowSource = "Sheet2!" & Sheets("Sheet2").Range(Chr(Asc(.ComboBox1.Value) + 1) & "1:" & Chr(Asc(.ComboBox1.Value) + 1) & "3").Address
  6.         .ComboBox2.ListIndex = 0
  7.         .CommandButton2.SetFocus
  8.     End With
  9. End Sub

  10. Private Sub ComboBox2_Change()
  11.     UserForm1.CommandButton2.SetFocus
  12. End Sub

  13. Private Sub CommandButton1_Click()
  14.     r = [a65536].End(3).Row + 1
  15.     Cells(r, 1).Value = ComboBox1.Value
  16.     Cells(r, 2).Value = ComboBox2.Value
  17. End Sub

  18. Private Sub CommandButton2_Click()
  19.     Unload UserForm1
  20. End Sub

  21. Private Sub UserForm_Initialize()
  22.     With UserForm1
  23.         '  .ComboBox1.RowSource = Names("¾÷¥x")
  24.         .ComboBox1.RowSource = "Sheet2!" & Sheets("Sheet2").[A1:A3].Address
  25.         .ComboBox1.ListIndex = 0
  26.         .CommandButton2.SetFocus
  27.     End With
  28. End Sub
½Æ»s¥N½X

TOP

·PÁÂGBKEE©Mc_c_lai¤j¤j¼ö¤ß¦a¦^´_

³o¼Ë´N²M·¡³\¦h¤F~

Ãö©óµ{¦¡½Xªº³¡¤À§Ú¦A¥h¬ã¨s¬Ý¬Ý

¦A¤@¦¸·PÁÂ

TOP

        ÀR«ä¦Û¦b : ª¾ÃÑ­n¥Î¤ßÅé·|¡A¤~¯àÅܦ¨¦Û¤vªº´¼¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD