You are returning an object, zso you will need to assign the return value using the Set command
Code:
public Function Executequery(sql As String) As Object
    dim Rs As New Adodb.recordset
    Set Rs=con.execute(sql)  'con Is A Connection
    Set Executequery = Rs
End Function