Consulting

Results 1 to 2 of 2

Thread: Solved: Issues with Find

  1. #1
    VBAX Tutor
    Joined
    Oct 2007
    Posts
    210
    Location

    Solved: Issues with Find

    The following code gives me an "object variable or With block variable not set" error
    [VBA]Private Function GetRow(RecID As Variant) As Long
    GetRow = cLog.Columns(cPrimaryKeyColumn).Find(What:=RecID, LookIn:=xlValues)
    End Function[/VBA]

    cLog is a worksheet
    cPrimaryKeyColumn is just as it sounds
    RecID is the search parameter

    the function is suppose to find and return the row that RecID is in.
    "The amount of stupid people in the world is God's way of punishing the smart people" - protean_being

  2. #2
    VBAX Tutor
    Joined
    Oct 2007
    Posts
    210
    Location
    Nevermind. Stupid mistake (defined cPrimaryKeyColumn incorrectly)
    "The amount of stupid people in the world is God's way of punishing the smart people" - protean_being

Posting Permissions

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