µ{¦¡°õ¦æ«á¥X²{Label¨S¦³³]©wª«ÅܼƩÎWith°Ï¶ôÅܼÆ
- ©«¤l
- 231
- ¥DÃD
- 55
- ºëµØ
- 0
- ¿n¤À
- 293
- ÂI¦W
- 0
- §@·~¨t²Î
- winxp
- ³nÅ骩¥»
- office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- KEELUNG
- µù¥U®É¶¡
- 2010-7-24
- ³Ì«áµn¿ý
- 2018-8-28
|
µ{¦¡°õ¦æ«á¥X²{Label¨S¦³³]©wª«ÅܼƩÎWith°Ï¶ôÅܼÆ
¦U¦ì¤j¤j¦n¡G
txtK1.rar (14.02 KB)
¤p§Ì·Q¤Þ¥Î¤U¦C»yªk¡A¦ý°õ¦æ¤§«á·|¥X²{
Label¨S¦³³]©wª«ÅܼƩÎWith°Ï¶ôÅܼơC
TextboxȵLªk¹ïÀ³¨ìLabel.Caption¤º¡C
½Ð°Ýì¦]¬°¦ó¤SÀ³¦p¦óק勵½T»yªk©O¡H
»yªk¦p¤U¡G
Private WithEvents myTb As MSForms.TextBox
Private WithEvents myLab As MSForms.Label
Private myCktype1 As Long
Private myCktype2 As Long
Public Property Set tb(setTb As MSForms.TextBox)
Set myTb = setTb
End Property
Public Property Get tb() As MSForms.TextBox
End Property
Public Property Let ck1(setCk1 As Long)
myCktype1 = setCk1
End Property
Public Property Set lb(setLb As MSForms.Label)
Set myLab = setLb
End Property
Public Property Let ck2(setCk2 As Long)
myCktype2 = setCk2
End Property
Private Sub myTb_Change()
myTb.Text = UCase(myTb)
Select Case myCktype1
Case 1
'UserForm1.Label1.Caption = myTb.Text
myLab.Caption = myTb.Text '¬°¦ó·|¥X²{¨S¦³³]©wª«ÅܼƩÎWith°Ï¶ôÅܼƩO¡H
Case 2
'UserForm1.Label2.Caption = myTb.Text
myLab.Caption = myTb.Text
Case 3
'UserForm1.Label3.Caption = myTb.Text
myLab.Caption = myTb.Text
End Select
End Sub
Private Sub UserForm_Initialize()
Dim i As Long
ReDim myTb(1 To 3)
For i = 1 To 3
Set myTb(i) = New mTxtClass
Set myTb(i).tb = Me.Controls("Textbox" & CStr(i))
Next
myTb(1).ck1 = 1
myTb(2).ck1 = 2
myTb(3).ck1 = 3
ReDim myLab(1 To 3)
For i = 1 To 3
Set myLab(i) = New mTxtClass
Set myLab(i).lb = Me.Controls("Label" & CStr(i))
Next
myLab(1).ck2 = 1
myLab(2).ck2 = 2
myLab(3).ck2 = 3
End Sub
ÁÂÁ¦U¦ì¤j¤j¡I |
|
|
|
|
|
|
- ©«¤l
- 231
- ¥DÃD
- 55
- ºëµØ
- 0
- ¿n¤À
- 293
- ÂI¦W
- 0
- §@·~¨t²Î
- winxp
- ³nÅ骩¥»
- office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- KEELUNG
- µù¥U®É¶¡
- 2010-7-24
- ³Ì«áµn¿ý
- 2018-8-28
|
¸É¥R»¡©ú¡G
ªí³æ¤W¦³¤TÓTextboxª«¥ó
Textbox1¿é¤J¦r¦ê®É¡ALabel1·|
Åã¥ÜTextbox1ªº¦r¦ê
¨ä¥¦¹p¦P |
|
|
|
|
|
|
- ©«¤l
- 472
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 485
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows
- ³nÅ骩¥»
- MS Office
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- »´ä
- µù¥U®É¶¡
- 2010-7-4
- ³Ì«áµn¿ý
- 2014-12-28
|
¦^´_ 1# dechiuan999
¸Õ¸Õקï¤@¤Uªí³æ³¡¥÷:- Dim myControl() As mTxtClass
- Private Sub UserForm_Initialize()
- Dim i As Long
- ReDim myControl(1 To 3)
- For i = 1 To 3
- Set myControl(i) = New mTxtClass
- Set myControl(i).tb = Me.Controls("Textbox" & CStr(i))
- Set myControl(i).lb = Me.Controls("Label" & CStr(i))
- Next
-
- myControl(1).ck1 = 1
- myControl(2).ck1 = 2
- myControl(3).ck1 = 3
-
-
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 231
- ¥DÃD
- 55
- ºëµØ
- 0
- ¿n¤À
- 293
- ÂI¦W
- 0
- §@·~¨t²Î
- winxp
- ³nÅ骩¥»
- office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- KEELUNG
- µù¥U®É¶¡
- 2010-7-24
- ³Ì«áµn¿ý
- 2018-8-28
|
¦^´_ 3# kimbal
ª©¥D¤j¤j±z¦n¡G
¤p§Ì¨Ìª©¥D¤j¤j´£¨Ñ
×¥¿¤§»yªk¡A¤w´ú¸Õ¦¨¥\¡C
¤p§Ì¹ïª«¥óÃþ§OÁÙ¬O²z¤£¥XÀYºü¡A
¥u¯à¦h¦V«e½ú½Ð¯q¤ÎÃ@µ¦¦Û¤w¦h¥[½m²ß¡C
´N·P®¦¡I |
|
|
|
|
|
|