| ©«¤l472 ¥DÃD5 ºëµØ0 ¿n¤À485 ÂI¦W0  §@·~¨t²ÎWindows ³nÅ骩¥»MS Office ¾\ŪÅv100 ©Ê§O¨k ¨Ó¦Û»´ä µù¥U®É¶¡2010-7-4 ³Ì«áµn¿ý2014-12-28 
 
 | 
                
| ¦^´_ 1# lifedidi 
 
 ³æ¿ïªº±¡ªp¥ÎOPTIONBUTTON·|¤ñ¸û¦n.
 
 
     ½Æ»s¥N½XPrivate Sub CommandButton1_Click()
    Call subCall(TextBox1, TextBox2, TextBox3, 1, 7, "¤@")
    Call subCall(TextBox4, TextBox5, TextBox6, 11, 17, "¤G")
    Call subCall(TextBox7, TextBox8, TextBox9, 21, 27, "¤T")
End Sub
Sub subCall(TB1 As msforms.TextBox, TB2 As msforms.TextBox, TB3 As msforms.TextBox, CBFROM1 As Integer, CBFROM2 As Integer, Rec As String)
    Dim strCode, i
    
    If TB1.Value = "" Then
        MsgBox "µL¸ê®Æ"
    Else
        Set A = Sheet1.[a65536].End(xlUp).Offset(1, 0)
        strCode = ""
        For i = CBFROM1 To CBFROM2
            With Me.Controls("Opt" & Trim(Str(i)))
                If .Value Then
                    strCode = Application.WorksheetFunction.VLookup(.Caption, Sheet2.Range("A1:B8"), 2, False)
                End If
            End With
        Next
        A.Resize(, 4).Value = Array(TB1, TB2, TB3, strCode)
        MsgBox "²Ä" & Rec & "µ§¸ê®Æ«Ø¥ß¦¨¥\¡I", vbOKOnly, "¦¨¥\"
    End If
End Sub
 | 
 |