View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Dget in VBA gets Object required run-time error?

try removing Value

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


--
Regards,
Tom Ogilvy

John MacGregor wrote in message
om...
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.