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

[µo°Ý] ComboBox1.BackColor°ÝÃD?

[µo°Ý] ComboBox1.BackColor°ÝÃD?

¦U¦ì°ª¤â«e½ú­Ì¤j®a¦n:

§Ú±NComboBox1©ñ¦bSHEET1¤u§@ªí¤¤,¥B¹Á¸Õ¥Î¥H¤Uµ{¦¡§ïÅܨä­I´ºÃC¦â,
Worksheets(1).ComboBox1.BackColor = RGB(255, 0, 0)
°ÝÃD¬Oµ{¦¡°õ¦æ¤¤,ÃC¦â¤£·|¥ß¨èÅÜ,
¥¨¶°°õ¦æ§¹²¦¤~·|ÅÜ,³o¤£¬O§Ú·Q­nªº®ÄªG,§Ú»Ý­nCOMBOBOX1§Y®É¤ÏÀ³ÃC¦â,
ÁٽФj®a¤£§[«üÂI~

¦^´_ 1# luiroger


    ÁÂÁ«e½úµoªí¦¹¥DÃD
«á¾Ç¤]«Ü·Qª¾¹D
1.«á¾Ç¥H«e¨S§ï¹L­I´º¦â,¤â°Ê³]©w¤µ¤Ñ¤~´ú¸Õ¨ì
2.¦pªG¶}±Ò¦Û©wªí³æ¤@¶}©l¤£·|ÅÜ­I´º¦â
3.¿é¤J²Ä¤@¦r¤~Åܦâ
¤µ¤Ñ¾Ç²ß¨ì¦Û­qªí³æ­I´º§ï¦â

¤â°Ê³]©w:


­è¶}±Ò¥¼Åܦâ:


¿é¤J²Ä¤@¦r¤~Åܦâ:


Sub TEST()
UserForm1.Show
End Sub

Private Sub ComboBox1_Change()
ComboBox1.BackColor = RGB(255, 255, 0)
End Sub

Private Sub UserForm_Click()

End Sub

TOP

¦^´_  luiroger


    ÁÂÁ«e½úµoªí¦¹¥DÃD
«á¾Ç¤]«Ü·Qª¾¹D
1.«á¾Ç¥H«e¨S§ï¹L­I´º¦â,¤â°Ê³]©w¤µ¤Ñ¤~´ú ...
Andy2483 µoªí©ó 2022-10-19 08:56



   
¦pªG¥u¬O³æ¯Âªí³æÅã¥Ü´N§â

combobox1.backcolor ÅÜÃC¦â

¥i¥Hª½±µ§â combobox1.backcolor ©ñ¸m¦b

Private Sub UserForm_Initialize()
        ComboBox1.BackColor = RGB(255, 255, 0)
end sub


Private Sub ComboBox1_Change()
if combobox1.text<>"" then combobox1.backcolor = rgb(0,0,255)
end sub


³o¼Ëªí³æÅã¥Ü/¤º®e¤£¬°ªÅ ´N·|ÅÜ°ÊÃC¦â

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

¦^´_ 3# mark15jill


    ÁÂÁ«e½ú«ü¾É
´ú¸ÕOK
https://learn.microsoft.com/zh-tw/office/vba/language/reference/user-interface-help/initialize-event
Initialize ¨Æ¥ó: ·|¦b¸ü¤Jª«¥ó¤§«á¦ýÅã¥Ü¤§«eµo¥Í¡C

TOP

¦^´_  mark15jill


    ÁÂÁ«e½ú«ü¾É
´ú¸ÕOK
https://learn.microsoft.com/zh-tw/office/vba/langua ...
Andy2483 µoªí©ó 2022-11-28 08:45


¤@°_ºë¶i§a~

¤Ó¤[¨S¸Iexcel vba  ¤]¬O¦AºCºC§ä¦^·Pı

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

        ÀR«ä¦Û¦b : ½_ÁJµ²±o¶V¹¡º¡¡A¶V·|©¹¤U««¡A¤@­Ó¤H¶V¦³¦¨´N¡A´N­n¶V¦³Á¾¨Rªº¯ÝÃÌ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD