ªð¦^¦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
ÁÂÁ«ü±Ð!

¥»©«³Ì«á¥Ñ lpk187 ©ó 2016-8-11 18:06 ½s¿è

¦^´_ 1# VBALearner

¥²¶·°Ï¤À¤j¤p¼g¡AµM«á À³¸Ó¬O ccont.Font.Size = 12
    If TypeName(ccont) = "ComboBox" Or TypeName(ccont) = "TextBox" Then ccont.Font.Size = 12

TOP

¦^´_ 1# VBALearner


    ¤w°õ¦æªº±±¨î¶µªºnameÄݩʵLªk¦b°õ¦æ¤¤Åܧó¦WºÙ¡A¦ý¥i¥H¦bControls.Add¦b·s¼W±±¨î¶µ®Éµ¹¤©¦WºÙ

TOP

¦^´_ 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

¦^´_ 6# VBALearner

  1. If typename(ccont) = "combobox" and ccont.Name = "Äw½X¤é*" Then
½Æ»s¥N½X

lpk187 ¤£¬O»¡¤F,TypeName ªº¦r¥À¤j¤p¼g­n§¹¥þ¤@¼Ë.
¦A§ï¤@¤U¬° ccont.Name Like  "Äw½X¤é*"
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ lpk187 ©ó 2016-8-12 08:05 ½s¿è

¦^´_ 5# VBALearner


    ¦b³Ð«Ø¤@­ÓUserformªº¦P®É¡A¥ý­×§ïUserform.fontÄÝ©Ê¡A¦A³Ð«Ø±±¨î¶µ¡A¨ä±±¨î¶µ¤]·|¦PUserform¦P¤@¼ËÄÝ©Ê
¬O¤£¥Î¼gµ{¦¡ªº¡I
¦ý¥ý³Ð«Ø±±¨î¶µ¦A­×§ïUserform.fontÄÝ©Ê¡A¨äÄÝ©Ê´N·|¤£¦P¡I

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

¦^´_ 9# VBALearner
  1. With MultiPage1
  2.         .Font.Size = 25
  3.         .ForeColor = vbRed
  4.   End With
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¯à¥I¥X·R¤ß´N¬OºÖ¡A¯à®ø°£·Ð´o´N¬O¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD