Help with a macro
Help with a macro
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Help with a macro

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I want to perform a simple task, within a macro.

    I created a macro, that searches columns, for specific information. When that information is found, I want the entire row deleted.

    For example. My macro prompts the user to enter the data to search for. It then finds the data and then asks if they want that row deleted. How can I make the macro select the current row, that it found the data in.

    Thanks...in advance.
    Patch

  2. #2
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Hi Patch

    How about:



    Code:
    Dim Rfound As Range
    Dim strFind As String
    
    On Error Resume Next
    
    Set Rfound = Columns("B:B").Find(What:=strFind, After:=ActiveCell, LookIn:=xlValues, LookAt _
            :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
            False).EntireRow
            
    If Not Rfound Is Nothing Then
      Rfound.Select
    Else
      MsgBox "No Match"
    End If
    
    On Error GoTo 0

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com