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

vba½G¨­,·P®¦

¦^´_ 1# sillykin
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Private Sub CommandButton1_Click()
  3.     With Sheets("¤u§@ªí3")  '¤£¥²Select¨ÓSelect¥h
  4.         OptionButton4 = .[J11] = 1
  5.         OptionButton3 = .[I11] = 1
  6.         OptionButton2 = .[H11] = 1
  7.         OptionButton1 = .[G11] = 1
  8.     End With
  9. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 3# sillykin
¦P¼Ëªº¤£¥²Select¨ÓSelect¥h¡A¸Õ¬Ý¬Ý¡C
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2016-2-14 15:38 ½s¿è

¦^´_ 11# sillykin
ªÅ¥Õªºªí³æ¼Ò²Õµ{¦¡½X
  1. Option Explicit
  2. Dim xAr(), xClass() As New OP_Class
  3. Private Sub UserForm_Initialize()
  4.      Dim xLeft As Integer, xTop As Integer, i As Integer, Form_Height As Integer, Form_Width As Integer
  5.      Dim OB As Object
  6.      xAr = Array("°ê¨¾¨Æ·~", "ĵ¹î³æ¦ì", "¨ä¥L¤½¦@¦æ¬FÃþ", "±Ð¨|Ãþ", "¾Ç¥Í", "¤u¡B°Ó¤ÎªA°ÈÃþ", "¹AªLº®ªªÃþ", "AAA", "BBBB", "CCCC", "DDDDD", "EEE")
  7.      'xAr ¤]¥i¥H¬O¤u§@ªí¤W³æÄæ©Î³æ¦Cªº½d³ò
  8.      ReDim xClass(1 To UBound(xAr) + 1)
  9.      xLeft = 10: xTop = 10
  10.      For i = 1 To UBound(xAr) + 1
  11.         Set OB = Controls.Add("Forms.OptionButton.1", "OptionButton" & i)
  12.         
  13.         Set xClass(i).Op = OB
  14.         With OB
  15.             .Caption = xAr(i - 1)
  16.             .Tag = i
  17.             .Left = xLeft
  18.             .Top = xTop
  19.             .Width = 150
  20.             .Height = 20
  21.             If i Mod 10 Then
  22.                  xTop = xTop + 10 + .Height
  23.                  Form_Height = IIf(Form_Height < xTop, xTop + 10 + .Height * 2, Form_Height)
  24.             Else
  25.                 xTop = 10
  26.                 xLeft = xLeft + 10 * 2 + .Width
  27.                 Form_Width = IIf(Form_Width < xLeft, Form_Width + xLeft + .Width, Form_Width)
  28.             End If
  29.         End With
  30.      Next
  31.      '½Õ¾ãFormªº°ª«×,¼e«×
  32.      Height = Form_Height
  33.      Width = Form_Width
  34. End Sub
½Æ»s¥N½X
ª«¥ó¼Ò²Õªºµ{¦¡½X
  1. Option Explicit
  2. Public WithEvents Op As MSForms.OptionButton
  3. Private Sub Op_Click()
  4.     'OptionButton
  5.     With Op
  6.         MsgBox .Name & vbLf & .Caption
  7.         [B58] = .Tag
  8.         [C58] = .Caption
  9.         Unload .Parent
  10.     End With
  11.     UserForm40.Show
  12. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¦Û¤v®`¦Û¤v¡A²ö¹L©ó¶ÃµoµÊ®ð¡C
ªð¦^¦Cªí ¤W¤@¥DÃD