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

[µo°Ý] ½Ð±Ð·s¼Wªí³æ½s¸¹°ÝÃD

  1. Private Sub CommandButton2_Click()
  2. Dim A As Range, Rng As Range
  3. If TextBox1.Text = "" Then
  4.     MsgBox "½Ð¿é¤J¥¿½Tªº­È"
  5. Else
  6. Application.ScreenUpdating = False
  7. Worksheets("¤u§@ªí2").Range("A:G").Clear
  8. With Worksheets("¤u§@ªí1")
  9. Set A = .Cells.Find(TextBox1, Lookat:=xlPart)
  10. If Not A Is Nothing Then
  11.   first = A.Address
  12. Do
  13. If Rng Is Nothing Then
  14.    Set Rng = .Cells(A.Row, 1).MergeArea
  15.    Else
  16.    Set Rng = Union(Rng, .Cells(A.Row, 1).MergeArea)
  17. End If
  18. Set A = .Cells.FindNext(A)
  19. Loop While Not A Is Nothing And A.Address <> first
  20. Rng.EntireRow.Copy Sheets("¤u§@ªí2").[A1]
  21. Else
  22. MsgBox "µL²Å¦X¸ê®Æ"
  23. End If
  24. End With
  25. End If
  26. Application.ScreenUpdating = True
  27. End Sub
½Æ»s¥N½X
¦^´_ 7# afu9240
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¥ÌÄ@°µ¡BÅw³ß¨ü¡C
ªð¦^¦Cªí ¤W¤@¥DÃD