Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Can anybody explain the following to me I have a com dll with a class Object that has a function setParam. When I call from VBA Object.setParam(X) gives me Error: 424 Object required But Object.setParam X and call Object.setParam(X) both work and if X is a Double instead of some object the first call above works I'd really like to understand what is the issue. (Even if I have the fix) Thanks in advance |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Because that is the syntax of VBE. You don't put the arguments in
parentheses unless you use the call. If you do, then the argument is evaluated before it is passed - in your case, you are returning the default value of X as the argument to SetParam so your object gets dereferenced or it can't be evaluated perhaps. If X is a double, then it is evaluated, but that doesn't change what X is - so no problem in that case. -- Regards, Tom Ogilvy "DavidM" wrote in message om... Hi Can anybody explain the following to me I have a com dll with a class Object that has a function setParam. When I call from VBA Object.setParam(X) gives me Error: 424 Object required But Object.setParam X and call Object.setParam(X) both work and if X is a Double instead of some object the first call above works I'd really like to understand what is the issue. (Even if I have the fix) Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error 424 - Object Required | Excel Programming | |||
424 Object required error | Excel Programming | |||
Object Required Error | Excel Programming | |||
Syntax Error Runtime Error '424' Object Required | Excel Programming | |||
error 424 - Object Required | Excel Programming |