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

[µo°Ý] ¨ÌÄæ¼Æ«Ø¥ß¿ï¶µ¡A¨Ã¦³¬Û¦üµ{¦¡«ü¥O

[µo°Ý] ¨ÌÄæ¼Æ«Ø¥ß¿ï¶µ¡A¨Ã¦³¬Û¦üµ{¦¡«ü¥O

§Ú·Q¨Ì·Ó¤u§@ªíªºÄæ¼Æ
«Ø¥ß¦P¼Ë¼Æ¶qªº¿ï¶µ«ö¯Ã

¨C­Ó¿ï¶µ¿ï¨ú«á
³£¯àÅã¥Ü¸Ó¿ï¶µªº¤º®e

¥Ø«e¥H¬d¨ìªº §Ú¥u·|¼g¼W¥[¿ï¶µ
¨C­Ó¿ï¶µªºµ{¦¡½X¤£ª¾«ç»ò¼g

ÁٽЦU¦ì°ª¤â«ü¾É
ÁÂÁÂ
  1. Private Sub UserForm_Initialize()
  2.     i = Cells(1, 1).End(xlToRight).Column
  3.     h = 0
  4.     Dim myC As Control
  5.    
  6.     For a = 1 To i
  7.         Set myC = Controls.Add(bstrprogid:="Forms.optionButton.1")
  8.         myC.Top = h
  9.         h = h + 20
  10.         myC.Caption = Cells(1, a)
  11.     Next a
  12. End Sub

  13. '¨C­Ó«ö¶s³£¬OÃþ¦ü³o¼Ëªº¥\¯à
  14. Private Sub OptionButton1_Change()
  15.     Label1.Caption = OptionButton1.Caption
  16. End Sub
½Æ»s¥N½X

¦^´_ 12# lpk187

¦¨¥\¸Ñ¨M¤F!
­ì¨Ó¬O³o¦a¤èªº°ÝÃD
ÁÂÁ§A

TOP

¥»©«³Ì«á¥Ñ lpk187 ©ó 2015-6-18 01:05 ½s¿è

¦^´_ 10# lyc43210

¶â¡I§ä¥X¨Óªº­ì¦]¦bSet X_OB(a ).OB = Controls(myC.Name)
­ì¨ÓªºReDim X_OB(15 To i)
°}¦C¬O±q15¶}©l
¦ýFor a = 1 To i - 14
³o¸Ìªº AÅܼƫh¬O±q1¶}©l©MX_OB°}¦Cªº½s¸¹¤£¦P³y¦¨ªº¿ù»~©Ò¥H­n§ï¦¨¤U¦C¡G
Set X_OB(a + 14).OB = Controls(myC.Name)

TOP

¦^´_ 10# lyc43210

¤W¶Ç§AªºÀɮפW¨Ó§a¡I

TOP

¦^´_ 8# lpk187

¨º¼Ë­×§ï«á¡A¤S¥i¥H¥¿±`°õ¦æ¤F
¦ý¥[¤J§Úªºµ{¦¡«á¤S¤£¦æ¤F
µM«á¤S¥X²{¤£¦Pªº¿ù»~

Â^¨ú.PNG
  1. Private Sub UserForm_Initialize()
  2.     i = Sheets(1).Cells(1, 1).End(xlToRight).Column
  3.     h = 336
  4.    
  5.     If i > 14 Then
  6.         ReDim X_OB(15 To i)
  7.         Dim myC As Control
  8.         For a = 1 To i - 14
  9.             Set myC = Controls.Add(bstrprogid:="Forms.optionButton.1")
  10.             With myC
  11.                 .Caption = "        " & Sheets(1).Cells(1, a + 14).Value
  12.                 .font.Name = "·L³n¥¿¶ÂÅé"
  13.                 .font.Size = 12
  14.                 .font.Bold = True
  15.                 .ForeColor = &HFFFFFF
  16.                 .BackColor = &HFFE66F
  17.                 .Height = 21.75
  18.                 .Width = 144.75
  19.                 .Left = -12
  20.                 h = h + 24
  21.                 .Top = h
  22.                 Sheets(2).ScrollHeight = h + 24
  23.                
  24.             End With
  25.             Set X_OB(a).OB = Controls(myC.Name)
  26.         Next a
  27.     End If
  28. End Sub
½Æ»s¥N½X

TOP

¦^´_ 7# lyc43210

TOP

¥»©«³Ì«á¥Ñ lpk187 ©ó 2015-6-17 22:30 ½s¿è

¦^´_ 4# lyc43210


  °²³]§A¬O¦³¨ä¥L±±¨î¶µªº¸Ü
  Set X_OB(A).OB = Controls(A)
³o¸ÌªºÅܼÆA¥i¥H§â¥¦§ï¦¨ Set myC = Controls.Add...·s¼W±±¶µªº¦WºÙ
¦p¤U¡G
Set X_OB(A).OB = Controls(myC.Name)

­ì¥»ªºÅܼÆA¬O«ü¨ì¥¦ªºControls§Ç¸¹¦ì¸m¡A§ï¦WºÙ¬O·|«ü¦V·s¼WControls±±¶µªº¦WºÙ

TOP

¦^´_ 6# lpk187

­è­è¶}­Ó·s¤u§@ªí  ­«·s´ú¸Õ
¤W­±§¹¾ã¤@¼Ò¤@¼Ëªºµ{¦¡½X ª½±µ©ñ¤J
«o³£·|¥X²{¿ù»~
¤£¹L¤§«e³£¬O¥i¥Hªº

Â^¨ú.PNG

TOP

¦^´_ 4# lyc43210


   §A¨S¦³§iª¾°µ¤F¤°»ò¼Ëªº­×§ï«á²£¥Í°ÝÃD¡C
©Ò¥H«ÜÃø¥h°µ¥X¦^µª¡I
¥i¥Hªº¸Ü¡C§â­×§ï¦³°ÝÃDªºµ{¦¡½X¥á¤W¨Ó¡A³o¼Ë­n¦^µª§A¤]¤ñ¸û¦³¤è¦V

TOP

¦^´_ 3# bobomi
ÁÙ¬O·s¤â ¬Ý¤£À´·N«ä
¥i¥H³Â·Ð«e½ú ¦h¸ÑÄÀ¤@ÂI¶Ü
·PÁÂ

TOP

        ÀR«ä¦Û¦b : ¬°¤H³B¥@­n¤p¤ß²Ó¤ß¡A¦ý¤£­n¡u¤p¤ß²´¡v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD