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

[µo°Ý] 20­Ó¬Û¦P¥\¯àComboBox¦p¦ó¥i¥H¬Ù¤u¼¶¼g?

¦^´_ 2# PKKO
Combobox ¦³­Ó AutoWordSelect ÄÝ©Ê¡A§ï¬° False ´N¤£·|¦Û°Ê±a¥X
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

¦^´_ 6# PKKO
§c©êºp¡A¨º¥i¯à¬O§Ú»~·|¨º­ÓÄݩʤF¡A
¦Ü©ó°ÝÃD¤@¡A¸m³»©« "¥»ª©­È±oÃöª`ªº¥DÃD±N³°Äò¼W¥[" ¸Ì­± 22 ¦³
¥D­n¬O¥Îª«¥óÃþ§O¨ÓºÞ²z¦@¦P¨Æ¥ó¡A§A¥i¥H¦Û¤v¸Õ¸Õ¬Ý
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

¥»©«³Ì«á¥Ñ stillfish00 ©ó 2014-12-8 11:12 ½s¿è

¦^´_ 23# PKKO
·s¼Wª«¥óÃþ§O¼Ò²Õ clsComboBox
  1. Private WithEvents mComboBox As MSForms.ComboBox

  2. Public Sub InitialControl(ByRef oControl)
  3.   Set mComboBox = oControl
  4. End Sub

  5. Private Sub mComboBox_Change()
  6.   mComboBox.Clear
  7. End Sub

  8. Private Sub mComboBox_DropButtonClick()
  9.   Dim ar, i As Long, j As Long
  10.   ar = Application.Transpose(Range([A1], [A1].End(xlDown)))
  11.   For i = 1 To UBound(ar)
  12.     If ar(i) Like mComboBox.Text & "*" Then
  13.       j = j + 1
  14.       ar(j) = ar(i)
  15.     End If
  16.   Next
  17.   
  18.   If j > 0 Then
  19.     ReDim Preserve ar(1 To j)
  20.     mComboBox.List = ar
  21.   End If
  22. End Sub
½Æ»s¥N½X
UserForm:
  1. Private gcolComboBoxs As Collection

  2. Private Sub UserForm_Initialize()
  3.   Dim oComboBox As clsComboBox, x
  4.   
  5.   Set gcolComboBoxs = New Collection
  6.   
  7.   For Each x In Me.Controls
  8.     If StrComp(TypeName(x), "ComboBox", vbTextCompare) = 0 Then
  9.       Set oComboBox = New clsComboBox
  10.       oComboBox.InitialControl x
  11.       gcolComboBoxs.Add oComboBox
  12.     End If
  13.   Next
  14. End Sub
½Æ»s¥N½X
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

        ÀR«ä¦Û¦b : ¤H¨ÆªºÁ}Ãø»PµZ¿i¡A´N¬O¤@ºØ¦ÒÅç¡C
ªð¦^¦Cªí ¤W¤@¥DÃD