Dget in VBA gets Object required run-time error?

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.
 
T

Tom Ogilvy

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top