excel - Function call on left-hand side of assignment must return variant or object error -


i've been developing program in excel vba time no errors. today however, adter commenting out outside of sub, of functions throw function call on left-hand side of assignment must return variant or object error error. see sample below:

public function fgetemployees() variant()  dim odb adodb.connection dim ocm adodb.command dim ors adodb.recordset dim strsql string  on error goto err:  strsql = "select staffid, firstname, lastname " & _         "from ptqemployees"  set odb = new adodb.connection odb.open gcconn set ocm = new adodb.command  ocm     .activeconnection = odb     .commandtext = strsql     .commandtype = adcmdtext     set ors = .execute end  fgetemployees = ors.getrows()  ors.close set ors = nothing odb.close set ors = nothing  exit function  err:     call flogdberror(err.number, err.description, 4)  end function 

the error gets thrown on line: fgetemployees = ors.getrows()

as said has been functioning no issues sometime now. there's no option debug either.

can assist issue is?

very strange exported module , imported , it's working fine now.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -