- ©«¤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 ©ó 2012-1-16 13:42 ½s¿è
¦^´_ 7# tonycho33
¸ê®Æ®w¤¤ZÄæ¨ìAFÄ檺Àx¦s®æ¦pªG¦³¤½¦¡³sµ²ªº¸Üªº¸Ü¦n¹³´N·|§ä¤£¨ì ½ÐÁ|Ó¨Ò
n¦p¦ó·s¼W®ÇÃ䪺B1¡ãB8 C1¡ãC3 D1¡ãD2 ¥i¨Ì¼Ëµe¸¬¯ø
½Ð§ï¦¨: ¤u¨ã->¦Ûq-±±¨î¤u¨ã½c ªº«ö¶s(CommandButton) ¹ïÀ³ªº¹Ï¤ù ½Ðn¥ý¥[¤u ¦p¹Ï:
ª«¥ó¼Ò²Õµ{¦¡½Xקï¦p¤U- Option Explicit
- Public WithEvents A_CommandButton As MSForms.CommandButton 'ª«¥ó¼Ò²Õªºª«¥óÅܼÆ
- Private Sub A_CommandButton_Click()
- Dim S As String, Rng As Range
- S = A_CommandButton.Caption
- With Sheet21
- Set Rng = .Columns("Z").Find(S, LookAT:=xlWhole)
- If Rng Is Nothing Then MsgBox "§ä¤£¨ì " & S: Exit Sub
- [K3].Resize(5, 7) = Rng.Resize(5, 7).Value
- If S Like "A*" Then
- S = Replace(A_CommandButton.Caption, "A", "Group ")
- '"A" §ï¬°"Group " : A15 -> Group 15
- ElseIf S Like "B*" Then
- S = Replace(A_CommandButton.Caption, "A", "GroupB ")
- '"B" §ï¬°"GroupB " : B1 -> GroupB 1
- ElseIf S Like "C*" Then
- S = Replace(A_CommandButton.Caption, "C", "GroupC ")
- '"C" §ï¬°"GroupC " : C1 -> GroupC 1
- ElseIf S Like "D*" Then
- S = Replace(A_CommandButton.Caption, "D", "GroupD ")
- '"B" §ï¬°"GroupD " : D1 -> GroupD 1
- End If
- .Shapes(S).Select
- If .[S1] > .[N6] And .[S1] < .[N7] Then
- Selection.ShapeRange.Fill.ForeColor.SchemeColor = 17
- Else
- Selection.ShapeRange.Fill.ForeColor.SchemeColor = 10
- End If
- End With
- DoEvents
- ActiveCell.Select
- End Sub
½Æ»s¥N½X |
|