- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2016-2-14 15:38 ½s¿è
¦^´_ 11# sillykin
ªÅ¥Õªºªí³æ¼Ò²Õµ{¦¡½X- Option Explicit
- Dim xAr(), xClass() As New OP_Class
- Private Sub UserForm_Initialize()
- Dim xLeft As Integer, xTop As Integer, i As Integer, Form_Height As Integer, Form_Width As Integer
- Dim OB As Object
- xAr = Array("°ê¨¾¨Æ·~", "ĵ¹î³æ¦ì", "¨ä¥L¤½¦@¦æ¬FÃþ", "±Ð¨|Ãþ", "¾Ç¥Í", "¤u¡B°Ó¤ÎªA°ÈÃþ", "¹AªLº®ªªÃþ", "AAA", "BBBB", "CCCC", "DDDDD", "EEE")
- 'xAr ¤]¥i¥H¬O¤u§@ªí¤W³æÄæ©Î³æ¦Cªº½d³ò
- ReDim xClass(1 To UBound(xAr) + 1)
- xLeft = 10: xTop = 10
- For i = 1 To UBound(xAr) + 1
- Set OB = Controls.Add("Forms.OptionButton.1", "OptionButton" & i)
-
- Set xClass(i).Op = OB
- With OB
- .Caption = xAr(i - 1)
- .Tag = i
- .Left = xLeft
- .Top = xTop
- .Width = 150
- .Height = 20
- If i Mod 10 Then
- xTop = xTop + 10 + .Height
- Form_Height = IIf(Form_Height < xTop, xTop + 10 + .Height * 2, Form_Height)
- Else
- xTop = 10
- xLeft = xLeft + 10 * 2 + .Width
- Form_Width = IIf(Form_Width < xLeft, Form_Width + xLeft + .Width, Form_Width)
- End If
- End With
- Next
- '½Õ¾ãFormªº°ª«×,¼e«×
- Height = Form_Height
- Width = Form_Width
- End Sub
½Æ»s¥N½X ª«¥ó¼Ò²Õªºµ{¦¡½X- Option Explicit
- Public WithEvents Op As MSForms.OptionButton
- Private Sub Op_Click()
- 'OptionButton
- With Op
- MsgBox .Name & vbLf & .Caption
- [B58] = .Tag
- [C58] = .Caption
- Unload .Parent
- End With
- UserForm40.Show
- End Sub
½Æ»s¥N½X
|
|