ªð¦^¦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 : ¤f»¡¦n¸Ü¡B¤ß·Q¦n·N¡B¨­¦æ¦n¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD