Results 1 to 3 of 3

using find in code

Threaded View

  1. #1
    Registered User
    Join Date
    07-20-2006
    Posts
    4

    using find in code

    I have a database set up on worksheet "Agents". In this database column A is Agent Name, Coulnm B is id number, column C is commission, etc. The following code will find the name in column A (name only appears once in column A).
     Sub Delete_Agent()
    Dim rngFound As Range
    
    With Sheets("agents").Columns("a")
        Set rngFound = .Find("name", lookat:=xlWhole)
        rngFound.Select
        
    End With
    I have two questions:

    1. What code would substitute the name found on sheet "data", Range("G6") for name in the code above?

    2. What code would delete the entire row that the name is found in under column A?

    Thanks for any help

    Max
    Last edited by VBA Noob; 06-07-2007 at 04:04 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1