- ©«¤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
|
¦^´_ 4# dino1978
ÁÙ¦³¥i²¤Æ- Private Sub CommandButton10_Click()
- ASlotRemove [C12] '¶Ç°e°Ñ¼ÆMyText : [C12]
- End Sub
- Private Sub CommandButton11_Click()
- ASlotRemove [C13] '¶Ç°e°Ñ¼ÆMyText : [C13]
- End Sub
- Private Sub CommandButton12_Click()
- ASlotRemove [C14] '¶Ç°e°Ñ¼ÆMyText : [C14]
- End Sub
½Æ»s¥N½X- Sub SlotRemove(ByVal MyText As Range) '±µ¦¬°Ñ¼Æ MyText
- Application.ScreenUpdating = False
- Dim Rng As Range, F_Address As String, TheFind As String, a As Range
- 'MyText = [C12] ' Trim(InputBox("½Ð¿é¤Jn´M§äªºÈ:"))
- If MyText <> "" Then
- Set Rng = Sheet3.Range("A1").CurrentRegion.EntireColumn.Find(MyText, lookat:=xlWhole)
- If Not Rng Is Nothing Then
- F_Address = Rng.Address
- Do
- TheFind = IIf(TheFind = "", Rng.Address(0, 0), TheFind & " " & Rng.Address(0, 0))
- Set Rng = Sheet3.Range("A1").CurrentRegion.EntireColumn.FindNext(Rng)
- Loop Until F_Address = Rng.Address
- End If
- Else: GoTo err2
- End If
- If TheFind <> "" Then
- If Rng Is Nothing Then
- GoTo err
- Else
- Sheet2.Range("A65536").End(xlUp).Offset(1) = Rng
- With Rng.Resize(1, 3)
- .Delete xlShiftUp
- End With
- With Range("B12")
- .Resize(1, 2).ClearContents
- .ClearContents
- .Offset(, 1).Validation.Delete
- End With
- End If
- Else
- err:
- MsgBox "¨S¦³§ä¨ì " & MyText
- err2:
- End If
- TheFind = ""
- Application.ScreenUpdating = True
- End Sub
½Æ»s¥N½X |
|