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

[µo°Ý] OptionButton ¿é¤J³]©w

[µo°Ý] OptionButton ¿é¤J³]©w

½Ð±Ð¦U¦ì¥ý¶i¤j¤j

§Ú­n³]©w¤@­Óµû¤À¿é¤J¨t²Î ¨C­Ó¶µ¥Øªº¤À¼Æ³£¬O°ß¤@ªº¡C

§Ú¥ÎFrame±N¦U­ÓOptionButton ¤À¸s²Õ¡A²{¦b¹J¨ì´X­Ó°ÝÃD¡G

1.¦p¦ó³]©w¨C­ÓOptionButton ¿é¤Jªº­È?   ¤À¼Æ:1~5¤À

2.¦³¬Æ»ò¼gªk¥i¥H¤À¿ëFrame©³¤UªºOptionButton.value = ture  µM«á¦A¿é¤J­È??

Employee Performance TEST.rar (45.23 KB)

¦^´_ 1# ¤pµØ
¥i¥H¦bUS1¤¤¼g¤@­ÓFunction ­pºâ

¨Ò¦p­pºâ3P¤¤ªºÁ`¤À:
  1. Function CalSum_3P() As Integer
  2.   CalSum_3P = 0
  3.   For i = 1 To 55  'OptionButton1 to OptionButton55
  4.     If Me.Controls("OptionButton" & i).Value = True Then
  5.       CalSum_3P = CalSum_3P + (5 - (i - 1) Mod 5)
  6.     End If
  7.   Next
  8. End Function
½Æ»s¥N½X

TOP

¦^´_ 2# stillfish00


    ³o¦ì¥ý¶i ©êºp ¦]¬°§Ú¹ï©óVBAÁÙ¤£¬O¤F¸Ñ«Ü¦h¡A©Ò¥H§Ú¤£¤ÓÀ´³o¤@¬qµ{¦¡­n¼g¦b­þ­Ó¦a¤è??

    ¥i¥H½Ð°Ý§A¨C¥yµ{¦¡ªº·N«ä¶Ü???

TOP

¦^´_ 3# ¤pµØ
¦^´_ 1# ¤pµØ
¥i¥H¦bUS1¤¤¼g¤@­ÓFunction ­pºâ


«ç»ò¥Î?¨Ò¦p¦bCommandButton1_Click()¤¤¥[¤J
  1. If ComboBox1.Value = "3P" Then MsgBox "Á`¤À : " & CalSum_3P()
½Æ»s¥N½X
OptionButton³£¦³¦Û¤vªº¦WºÙ¡A3P¤¤ªº¦WºÙ¬O±qOptionButton1¨ìOptionButton55
¦]¬°¬O·Ó¶¶§Ç¤S¦³³W«ß ¨C¦¸5­Ó
¨Ì OptionButton1  =>  5¤À
     OptionButton2  =>  4¤À
     .........¨Ì¦¹Ãþ±À
©Ò¥HOptionButtonXX ªº¤À¼Æ¥i¥H¥Î(5 - (i - 1) Mod 5) ªí¥Ü (Mod¬O¨ú¾l¼Æ)
ÁÙ¦³¡A¦]¬°function©ñ¦bªí³æUS1¤¤¡A©Ò¥HMe.Controls«üªº´N¬OUS1.Controls

TOP

¦^´_ 4# stillfish00


    ÁÂÁ³o¦ì¥ý¶iªº¸Ñ»¡~~¥i¬O³o¬qµ{¦¡½X¦n¹³·|ª½±µ§â¤À¼Æ¥[Á`

§Ú¬O»Ý­n±N¦U­ÓÃþ§OÀx¦s³æ¤@ªº¤À¼Æ    ¨Ò¦p:¤u§@ºA«×  3¤À    °t¦X«×  4¤À  µ¥µ¥......¤À§O¦s¦b¥t¤@¥÷EXCELÀÉ¡A·í§@¸ê®Æ®w

¦]¬°§Ú¤£ª¾¹D¸Ó¦p¦ó¼gµ{¦¡  Åýµ{¦¡§P§OFrameXX©³¤UªºOptionButtonXXªº­È¬O¤£¬OTURE¡A¦pªG¬Oªº¸ÜÀx¦s¤À¼Æ¨ì¹ïÀ³ªºÀx¦s®æ¡C

TOP

¦^´_ 5# ¤pµØ
°²³]Frame©³¤U³£5­ÓOptionButton¡A³£«ö¶¶§Ç :
  1. Function GetOption(ByRef vFrame As Variant) As Integer
  2.   Dim i
  3.   For i = 0 To vFrame.Controls.Count - 1
  4.     If vFrame.Controls(i).Value = True Then
  5.       GetOption = 5 - i
  6.       Exit For
  7.     End If
  8.   Next
  9. End Function
½Æ»s¥N½X
¨Ò : CommandButton1_Click()¤¤
  1. x.Cells(recond, 7) = GetOption(Me.Frame1)
  2. x.Cells(recond, 8) = GetOption(Me.Frame2)
½Æ»s¥N½X

TOP

¦^´_ 6# stillfish00


    ·PÁÂ¥ý¶iªºÀ°§U!~~~µ{¦¡¤w¸g¥i¥H§P§O¨Ã¥B¥¿½T¿é¤J¤F¡C

ÁÙ¦³¤@¨Ç°ÝÃD·Q½Ð°Ý¡G

1.½Ð°Ý³o¦ì¥ý¶i©Ò¼gªºµ{¦¡½X¥Nªíªº·N«ä??  ¦³¤Ó¦h¬Ý¤£À´ªºµ{¦¡½X........
  ·Q¦h¤F¸Ñµ{¦¡½Xªº·N«ä¡A¦b¤é«á¥i¥H§ó¥[ªºÀ³¥Î

2.µ{¦¡¦b¤À¿ëPage1~Page3.Enabled¬O§_¬°true®É¥i¥H¥¿±`¹B§@¡A¥i¬O¦h¿ï´X¦¸¤§«á  Page¤U­±ªº¸ê®Æ³£¤£¨£¤F??  ¥²¶·­n¥Î·Æ¹«ÂI¤@¤U¸ÓPage ¤~·|Åã¥Ü¤U­±ªº¸ê®Æ
   ½Ð°Ý³o¬O¬Æ»ò°ÝÃD©O?

TOP

¥»©«³Ì«á¥Ñ stillfish00 ©ó 2014-2-19 21:15 ½s¿è

¦^´_ 7# ¤pµØ
¦]¬°§A¥u¬O§â¤À­¶³]¬°¥i¿ï¡A¦ý¬O¨S¦³¿ï¥¦
  1. MultiPage1.Page1.Enabled = False
  2. MultiPage1.Page2.Enabled = False
  3. MultiPage1.Page3.Enabled = False
  4. Select Case ComboBox1.Value
  5.   Case "3P"
  6.     MultiPage1.Page1.Enabled = True  '³]¬°¥i¿ï
  7.     MultiPage1.Value = 0  '¿ï¾Ü²Ä1­Ópage
  8.   Case "L1", "L2", "L3"
  9.     MultiPage1.Page2.Enabled = True  
  10.     MultiPage1.Value = 1  '¿ï¾Ü²Ä2­Ópage
  11.   Case "L4", "L5", "L6"
  12.     MultiPage1.Page3.Enabled = True
  13.     MultiPage1.Value = 2  '¿ï¾Ü²Ä3­Ópage
  14. End Select
½Æ»s¥N½X

TOP

¦^´_ 8# stillfish00


    ÁÂÁ³o¦ì¥ý¶iªº±Ð¾É!~~~

¹ï©óµ{¦¡»y¨¥   §Ú­n¾ÇªºªF¦èÁ٫ܦh

·PÁÂ¥ý¶i¤£Ã㨯­Wªº±Ð¾É!~~

TOP

        ÀR«ä¦Û¦b : §Ú­Ì­n°µ¦nªÀ·|ªºÀô«O¡A¤]­n°µ¦n¤º¤ßªºÀô«O¡C
ªð¦^¦Cªí ¤W¤@¥DÃD