PDA

View Full Version : Solved: Issues with Find



ProteanBeing
03-26-2008, 06:44 AM
The following code gives me an "object variable or With block variable not set" error
Private Function GetRow(RecID As Variant) As Long
GetRow = cLog.Columns(cPrimaryKeyColumn).Find(What:=RecID, LookIn:=xlValues)
End Function

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.

ProteanBeing
03-26-2008, 06:50 AM
Nevermind. Stupid mistake (defined cPrimaryKeyColumn incorrectly)