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

[Âà¶K] ¨Ì·ÓÅܼƧó§ïCommandButton©³¦â

[Âà¶K] ¨Ì·ÓÅܼƧó§ïCommandButton©³¦â

½Ð±Ð¦U¦ì¤j¤j:

­Y¦b¬Y¤@ªí³æ¤¤,¦³ CommandButton1 ~ 20,
¤µ·Q¨Ì·ÓÅÜ¼Æ i ªºµ²ªG¶i¦æ©³¦â§ó§ï,
¨Ò¦p i=5 ®É,±N CommandButton1 §ó§ï©³¦â,
¥H¦¹Ãþ±À~
¸Õ¹L "CommandButton" & i.BackColor = &HFF80FF ...¥¢±Ñ,
¦]¬°ª«¥ó¦n¹³¤£¯à³o¼Ë¨Ï¥Î.¦ý¤£¾å±o¸Ó¦p¦ó­×§ï?
·PÁÂ~

oobird«e½ú¦^ÂЪºÀÉ®× sample.rar (15.13 KB)

¦^´_ 2# PD961A
¶}±Ò¨S°ÝÃD

TOP

  1. Private Sub UserForm_Initialize()
  2.     Dim i%, A
  3.     For i = 1 To 20
  4.         Set newclass(i) = New Ãþ
  5.      Set newclass(i).che = Controls("CommandButton" & i)
  6.         Controls("CommandButton" & i).BackColor = QBColor(IIf(i < 15, i - 1, i - 14))
  7.     Next
  8. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¡i¥Í©R¦b©I§l¶¡¡j¦òªû»¡¡G¡u¥Í©R¦b©I§l¶¡¡C¡v¤HµLªkºÞ¦í¦Û¤vªº¥Í©R¡A§óµLªk¾×¦í¦º´Á¡AÅý¦Û¤v¥Ã¦í¤H¶¡¡C¬JµM¥Í©R¥h¨Ó³o»òµL±`¡A§Ú­Ì§óÀ³¸Ó¦n¦n¦a·R±¤¥¦¡B§Q¥Î¥¦¡B¥R¹ê¥¦¡AÅý³oµL±`¡BÄ_¶Qªº¥Í©R¡A´²µo¥¦¯uµ½¬üªº¥ú½÷¡A¬M·Ó¥X¥Í©R¯u¥¿ªº»ù­È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD