Dget in VBA gets Object required run-time error?

  • Thread starter Thread starter John MacGregor
  • Start date Start date
J

John MacGregor

This sheet function is ok:
DGET(ACDB, "TAS", $B$1:$B$2)
I can not get it to work in VBA:
Tas = Application.WorksheetFunction.DGet(ACDB, "TAS", Range("$B$1:$B$2").Value)
I get the Run-time error 424.
I have tried to explicitly specify the first and third parameter without any joy.
 
try removing Value

Tas = Application.WorksheetFunction.DGet(ACDB, "TAS", Range("$B$1:$B$2"))


--
Regards,
Tom Ogilvy

John MacGregor said:
This sheet function is ok:
DGET(ACDB, "TAS", $B$1:$B$2)
I can not get it to work in VBA:
Tas = Application.WorksheetFunction.DGet(ACDB, "TAS", Range("$B$1:$B$2").Value)
I get the Run-time error 424.
I have tried to explicitly specify the first and third parameter without
any joy.
 
Back
Top