- ©«¤l
- 552
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 578
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-2-8
- ³Ì«áµn¿ý
- 2024-7-9
|
¥»©«³Ì«á¥Ñ lpk187 ©ó 2015-6-16 22:23 ½s¿è
¦^´_ 1# lyc43210
¤]¤£ª¾¹ï¤£¹ï¡A¨þ¨þ¡I§Ú¤]¬O½m²ß
UserForm:- Dim X_OB() As New Class1
- Private Sub UserForm_Initialize()
- I = Cells(1, 1).End(xlToRight).Column
- h = 0
- ReDim X_OB(1 To I)
- Dim myC As Control
- For A = 1 To I
- Set myC = Controls.Add(bstrprogid:="Forms.optionButton.1")
- myC.Top = h
- h = h + 20
- myC.Caption = Cells(1, A)
- Set X_OB(A).OB = Controls(A)
- Next A
- End Sub
½Æ»s¥N½X Class1:- Public WithEvents OB As MSForms.OptionButton
- Private Sub OB_Click()
- UserForm1.Label1 = OB.Caption
- End Sub
½Æ»s¥N½X |
|