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

[µo°Ý] ¦³Ãö©óComBoBox ¨Ï¥Î¤èªk

[µo°Ý] ¦³Ãö©óComBoBox ¨Ï¥Î¤èªk

½Ð°Ý¦U¦ì«e½ú

³Ìªñ¦b¹Á¸Õ¨Ï¥Î¤@¨Ç«ö¶s¡B²M³æ
²{¦b¹Á¸Õ§Q¥ÎCombobox
¸ò¨ä¥L»y¨¥¦n¹³¦³ÂI¤£¤@¼Ë

§Oªº»y¨¥¥i¥H³]¹w³]²M³æ¤º®eÁÙ·|½s¸¹
VBA¦n¹³¨S¦³³oºØ¥\¯à

§Ú·Q½Ð°Ý§Ú­n¦p¦ó§Q¥Î
Combobox ¨Ó§¹¦¨
¨Ò¡G
    ·Q¦Yªº¿ï¶µ
    1.¤ôªG
    2.½­µæ
   
    ®Ú¾Ú¿ï¾Üªº¶µ¥Ø¸õ¥X     Msgbox "¿ï¾Üªº¶µ¥Ø"

½Ð°Ý¦p¦ó²¾°£Item?

TOP

¦^´_ 6# mark15jill

ÁÂÁ«e½ú~Åý§Ú¦h¤F¸Ñ¤@ºØ¤èªk!

TOP

b]¦^´_ 5# a703130

¦A´£¨Ñ­Ó¤p¤èªk


[

TOP

¥»©«³Ì«á¥Ñ a703130 ©ó 2012-3-15 11:30 ½s¿è

§Ú¤w¸gª¦¤å§ä¨ì¤èªk¤F
http://forum.twbts.com/viewthrea ... ;highlight=combobox

³oÃä¤w¸g¦³§Ú»Ý­nªº¤èªk
¦b Workbook ¶ñ¤J¤U­±µ{¦¡½X¡A¥i¥HÅýExcel¤@¥´¶}´N¥ý°õ¦æ
  1. Private Sub Workbook_Open()
  2.   Call Sheets(1).ComBoxInit
  3. End Sub
½Æ»s¥N½X
¦b§Úªº¤u§@­¶«K¦p¤U­±µ{¦¡½X¡A´N¼Ë´N¯à¤@¶}¤u§@­¶®É¡Acombobox´N·|¦³¸ê®Æ
  1. Sub ComBoxInit()
  2.   With ComboBox1
  3.     .List = Array("½­µæ", "¤ôªG")
  4.     .Text = "²M³æ"
  5.   End With
  6. End Sub
  7. End Sub
½Æ»s¥N½X
¤£¦n·N«ä®ö¶O½×¾Â¸ê·½

TOP

«e½ú¥i¯à·d¿ù§Úªº°ÝÃD¤F
§Ú·Q­n¦bÀɮפ@¥´¶}®É¡A¤u§@­¶¤WªºCombobox ´N¥ýÅã¥Ü¸Ì­±ªº²M³æ
·í§Ú«ö¤U½bÀY®É¡A"½­µæ"¸ò"¤ôªG"¿ï¶µ´N·|¥X²{
§Úª¦¤å¬Ý¨ì¤H®aªº§@ªk¬O­n¥ý±N²M³æ¼g¦b¤u§@­¶¤W¡A·Q½Ð°Ý¬O§_¦³§OºØ¤è¦¡¡A¬O¤£»Ý­n«Ø¸ê®Æ®wªº
¥t¥~§Ú·Q¦b½Ð°Ý¡A§Úµo²{combobox¤ºªº­È¬O¥i¥H­×§ïªº¡A¤]·Q½Ð°Ý­þ¤@­ÓÄÝ©Ê­È¥i¥H±N¥¦§ï¦¨¤£¯à­×§ï

¥¼©R¦W.JPG

¦A½Ð«e½ú­ÌÀ°¦£~ÁÂÁÂ

TOP

¦^´_ 1# a703130


    §A¬O­nªí³æ ÁÙ¬O Àx¦s®æ ªº«¬ºA?

ªþÀÉ ¬° ªí³æ«¬ºA
¤ôªG½­µæ.rar (9 KB)


¤ôªG ½­µæ.jpg

TOP

¦^´_ 1# a703130


    ³o­ÓÀ³¸Ó¥i¥Hº¡¨¬§A
    ¨S¦³½s¸¹~ §Ú­Ì¥i¥H¦Û¤v³]§r~ ^^
   ¤U¹Ï¬O§Ú¼ÒÀÀªº®æ¦¡~ ±z¦A¦Û¦æ­×§ï±z­nªº
   
  1. Private Sub ComboBox1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
  2. ComboBox1.Clear
  3. A = Range("A65536").End(xlUp).Row
  4. For I = 2 To A
  5.    With ActiveSheet.ComboBox1
  6.        .AddItem I - 1 & Range("A" & I)
  7.    End With
  8. Next
  9. End Sub
½Æ»s¥N½X
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

        ÀR«ä¦Û¦b : ¸Ü¦h¤£¦p¸Ü¤Ö¡A¸Ü¤Ö¤£¦p¸Ü¦n¡C
ªð¦^¦Cªí ¤W¤@¥DÃD