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

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

¥»©«³Ì«á¥Ñ 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

        ÀR«ä¦Û¦b : ¦Y­W¤F­W¡B­WºÉ¤Ü¨Ó¡A¨ÉºÖ¤FºÖ¡BºÖºÉ´d¨Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD