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

[µo°Ý] Åý©Ò¦³ComboBoxªºCaption¦rÅé¤j¤p³£¬O12

[µo°Ý] Åý©Ò¦³ComboBoxªºCaption¦rÅé¤j¤p³£¬O12

¥»©«³Ì«á¥Ñ VBALearner ©ó 2016-8-11 17:34 ½s¿è

½Ð°Ý¦U¦ì°ª¤â
¤p§Ì§Ú¥¿¦b³]­p¦³MultipageªºUserform(name : ªí³æ)
²{¦b­±Á{¨ì´X­Ó°ÝÃD·Q½Ð±Ð¦U¦ì~~~
1.¦p¦ó¥Îµ{¦¡ÅýUserform¤W­±©Ò¦³ªºTextbox¸òCombobox¦r«¬³£¬O12 ?  ¥H¤Uµ{¦¡¬O§Ú¸Õ¼g¦bªí³æªºµ{¦¡½X¸Ì¡A¦ý¤£ª¾¬°¦ó°õ¦æµL®Ä¡AÀ³¸Ó¸ò¦h­Ó±±¨î¶µ¦b¤£¦Ppages¨SÃö§a...ÁÙ¬O»¡¥u¯à¦bInitialize¸Ì¦P®É°õ¦æ§ó§ïÄÝ©Ê?
  1. Sub test()
  2.     Dim ccont As Control
  3.     For Each ccont In ªí³æ.Controls
  4.         if typename(ccont) = "combobox" or typename(ccont) = "textbox" then ccont.Caption.Font.Size = 12
  5.     Next ccont
  6. End Sub
½Æ»s¥N½X
2.Multipages©³¤Upageªº¼ÐÅÒCaption¦r«¬¦rÅé¤j¤p©ÎÃC¦â¦³¿ìªk§ïÅܶÜ?
3.¦³¿ìªk§å¶q§ó§ï¦U­Ópageªº±±¨î¶µnameÄݩʶÜ? ¨Ò¦p:page2ªºcombobox¦³10­Ó¡A«h¦¹­¶ªºcombobox.name = "page2combobox1"....10¡A¶¶§ÇÀH¾÷¨SÃö«Y
ÁÂÁ«ü±Ð!

¦^´_ 2# lpk187

¨º½Ð°Ý¤@¤U §Ú¦pªG¤£­n¦bUserform_Initializeµ{¦¡½X¤~°µ§ó§ïÄݩʰʧ@¡A­nª½±µ§ó§ï©Ò¦³±±¨î¶µ¹w³]ªº¦rÅé¤j¤p¡A¸Ó¦p¦ó°õ¦æµ{¦¡½X?
¦]¬°§Ú§ó§ï§¹µ{¦¡°õ¦æ«á¡A¨C­Ó±±¨î¶µªºfontÄÝ©ÊÁÙ¬O¨S¦³ÅÜ...

TOP

¹ï©Ò¦³nameÄݩʬ°A¶}ÀYªºComboBox...

¦A«×½Ð±Ð¦U¦ì°ª¤â
§Ú·Q¹ï©Ò¦³ªí³æ¤W±±¨î¶µnameÄݩʬ°A¶}ÀYªºComboBox§@¥H¤U³]©w
  1. Private Sub UserForm_Initialize()
  2.     Dim ccont As Control
  3.     Dim ar
  4.     ar = Array("1", "3", "5")
  5.    
  6.     For Each ccont In Me.Controls
  7.         If typename(ccont) = "combobox" and ccont.Name = "Äw½X¤é*" Then ccont.List = ar
  8.     Next
  9. End Sub
½Æ»s¥N½X
½Ð°Ýµ{¦¡¿ù¦b­þ¸Ì? °õ¦æµL®ÄªG...
ÁÂÁ«ü±Ð

TOP

¦^´_ 8# lpk187

³á³á¤F¸Ñ¤FÁÂÁ«ü±Ð!

TOP

¥»©«³Ì«á¥Ñ VBALearner ©ó 2016-8-12 11:36 ½s¿è

¦^´_ 7# GBKEE

ªüªüÀ´¤F~~~§Ú¥H¬°¬O"T"ype"N"ameªº¤j¤p¼g­n¤@¼Ë¡A­ì¨Ó¬O«ü"ComboBox"¤j¤p¼g
§ï¥ÎLike©~µM¦¨¥\¤F!! ¥i¥H½Ð°Ý¶W¯Åª©¥D¬O¬°¤°»ò¶ÜO___O?! ¤p§ÌÁÙ¹à...
³á¹ï¤F~~ÁÙ¦³Multipages©³¤Upageªº¼ÐÅÒCaption¦r«¬¦rÅé¤j¤p©ÎÃC¦â¦³¿ìªk§ïÅܶÜ?

TOP

[ª©¥DºÞ²z¯d¨¥]
  • GBKEE(2016/8/14 08:15): ¦h¬Ý¬Ý vba ªº»¡©ú·|¤F¸Ñ,¶i¨Bªº.

¥»©«³Ì«á¥Ñ VBALearner ©ó 2016-8-13 13:50 ½s¿è

¦^´_ 10# GBKEE

¹ï¤£°_¶W¯Åª©¥D~§Ú°ÝÃD¤@ª½°Ý¤£§¹O__Q! ³Ì«á¤@­Ó°ÝÃD´N¦n
1.¬°¤°»òccont.name Like "Äw½X*" ·|¦¨¥\? §ï¥Î = "Äw½X*" ´N¤£¦æ?!
¯u¤ß·PÁ¨C¤@¦ìÄ@·N¤À¨É©Ò¾Ç¡B«ü¾É·s¤âªº¤H!

TOP

¦^´_ 12# c_c_lai

¦nªºÁÂÁÂC¤jªº¦^ÂСA·PÁÂC¤j¦^§Ú«Ü¦h°ÝÃDOwQ¡A·P¿E¤£ºÉ!
¯u¤ß·PÁ¨C¤@¦ìÄ@·N¤À¨É©Ò¾Ç¡B«ü¾É·s¤âªº¤H!

TOP

¦^´_ 11# VBALearner

¦nªº ª©¥D±z»¡ªº¬O³o­Ó¶Ü?
https://msdn.microsoft.com/zh-tw/library/office/ff194068.aspx
¯u¤ß·PÁ¨C¤@¦ìÄ@·N¤À¨É©Ò¾Ç¡B«ü¾É·s¤âªº¤H!

TOP

        ÀR«ä¦Û¦b : ¤Ó¶§¥ú¤j¡B¤÷¥À®¦¤j¡B§g¤l¶q¤j¡A¤p¤H®ð¤j¡C
ªð¦^¦Cªí ¤W¤@¥DÃD