- ©«¤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
![2017 Âû¦~¥þ¶Ô¼ú³¹ 2017 Âû¦~¥þ¶Ô¼ú³¹](images/common/ji.gif) ![2016µU¦~¥þ¶Ô¼ú³¹ 2016µU¦~¥þ¶Ô¼ú³¹](images/common/hou.gif) ![2015¦Ï¦~¥þ¶Ô¼ú³¹ 2015¦Ï¦~¥þ¶Ô¼ú³¹](images/common/yang.gif) ![2014°¨¦~¥þ¶Ô¼ú³¹ 2014°¨¦~¥þ¶Ô¼ú³¹](images/common/ma.gif) ![2013³D¦~¥þ¶Ô¼ú³¹ 2013³D¦~¥þ¶Ô¼ú³¹](images/common/she.gif) ![2012Às¦~¥þ¶Ô¼ú³¹ 2012Às¦~¥þ¶Ô¼ú³¹](images/common/long.gif) ![½×¾Â°^Äm¾±³¹ ½×¾Â°^Äm¾±³¹](images/common/medal5.gif) ![¼ö¯P°Ñ»P¾±³¹ ¼ö¯P°Ñ»P¾±³¹](images/common/medal7.gif) ![2011¨ß¦~¥þ¶Ô¼ú³¹ 2011¨ß¦~¥þ¶Ô¼ú³¹](images/common/tu.gif)
|
¦^´_ 3# man65boy
UserForm3,UserForm4
³£¦³- Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
- a1 = ListBox1.Value
- ActiveCell = IIf(ActiveCell = "", a1, ActiveCell & "¡B" & a1)
- End Sub
½Æ»s¥N½X ªí¥Ü¥i½Æ¿ï
«Øij
UserForm4- Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
- Dim A As String, Ar As Variant
- A = UCase(ListBox1.Value)
- Ar = Filter(Split(ActiveCell, "¡B"), A)
- If UBound(Ar) = -1 Then 'ListBox1.Value ¤£¦b ActiveCell¤¤
- Ar = Application.Evaluate("VLOOKUP(""" & A & """,²£«~½s¸¹!a:b,2,0)")
- If IsError(Ar) Then '§ä¤£¨ì¨Ï¥Î³W®æ©Î¨Ï¥Î³W®æ=""
- MsgBox A & " §ä¤£¨ì¨Ï¥Î³W®æ ©Î ¨Ï¥Î³W®æ = """""
- Else
- T = IIf(T <> "", T & "¡B" & MM, MM)
- ActiveCell = UCase(IIf(ActiveCell = "", A, ActiveCell & "¡B" & A))
- End If
- Else
- MsgBox A & "¤w¿ï¾Ü"
- End If
- End Sub
½Æ»s¥N½X ¤u§@ªí¼Ò²Õ- Private Sub Worksheet_Change(ByVal Target As Range)
- Ex Target, False
- End Sub
- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- Ex Target, True
- End Sub
- Private Sub Ex(ByVal Target As Range, Form_Show As Boolean)
- Application.EnableEvents = False
- With Target
- If .Count = 1 And .Row >= 2 Then
- If .Column = 6 Then
- ½s¸¹ .Cells, Sheets("²£«~½s¸¹")
- If Form_Show Then UserForm4.Show False
- ElseIf .Column = 13 Then
- ½s¸¹ .Cells, Sheets("Sheet1")
- If Form_Show Then UserForm3.Show False
- End If
- End If
- End With
- Application.EnableEvents = True
- End Sub
- Private Sub ½s¸¹(ByVal Target As Range, Sh As Worksheet)
- Dim Ar As Variant, e As Variant, MM As Variant, T As String
- Dim Rng As Range
- Set Rng = Sh.Range("A:B")
- Ar = Split(Target, "¡B")
- Ag:
- For Each e In Ar
- MM = Application.Evaluate("VLOOKUP(""" & e & """," & Rng.Address(, , , 1, 1) & ",2,0)")
- If IsError(MM) Then Exit For
- T = IIf(T <> "", T & "¡B" & MM, MM)
- Next
- If IsError(MM) Then GoTo Er:
- If Sh.Name = "²£«~½s¸¹" Then
- Target.Offset(, 1) = T
- Else
- Target = T
- End If
- Exit Sub
- Er:
- Ar = Filter(Ar, e, False)
- Target = Join(Ar, "¡B")
- T = ""
- If e = "" Then Exit Sub
- GoTo Ag
- End Sub
½Æ»s¥N½X |
|