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

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

¥»©«³Ì«á¥Ñ 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

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

¹ï©Ò¦³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

¦^´_ 2# lpk187

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

TOP

¦^´_ 1# VBALearner


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

TOP

¥»©«³Ì«á¥Ñ 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

        ÀR«ä¦Û¦b : ¦n¨Æ­n´£±o°_¡A¬O«D­n©ñ±o¤U¡A¦¨´N§O¤H§Y¬O¦¨´N¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD