Type mismatch error


Posted by Fareed on May 09, 2001 4:25 AM

hi,

I getting a type mismatch error using the following bit of code in a VBA subroutine.

test = EUROCONVERT(1.2, "temp1", "temp2", True, 3)

I am using the references to the EuroTool utilities in Excel. I don't understand why I am getting this error, can someone please help.

Thanks.


Posted by Dave Hawley on May 09, 2001 7:33 AM

Hi Fareed

I have nt used this function, but when using a Worksheet formula in VBA you must use:


WorksheetFormula.EUROCONVERT(1.2, "temp1", "temp2", True, 3)

Dave
OzGrid Business Applications

Posted by Fareed on May 09, 2001 7:43 AM

Thanks Dave, it seems to get rid of the type mismatch error, but now I get a 'Object Required' error.

Do I need to use an object with this function?? If so which type?

Thanks!!

Posted by Dave Hawley on May 09, 2001 7:53 AM

What's the syntax for this function ?

..try

Application.WorksheetFormula.EUROCONVERT(1.2, "temp1", "temp2", True, 3)


Dave

OzGrid Business Applications

Posted by Fareed on May 09, 2001 8:02 AM

Dave,

The syntax for this function on the spreadsheet is 'EUROCONVERT(1.2, "temp1", "temp2", True, 3)'

But the syntax you've given me doesn't work, it keeps on coming up with 'object required' or 'object doesn't support these methodsor properties'.

Thanks!

Posted by Dave Hawley on May 09, 2001 8:17 AM


Fareed, I haven't given you any syntax! I'm asking you that question.

'EUROCONVERT(1.2, "temp1", "temp2", True, 3)'

Is not a syntax! They are the arguments you are trying to pass to the Function. An example of a sytax for, say VLOOKUP would be:

VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)


Dave
OzGrid Business Applications

Posted by Fareed on May 09, 2001 8:23 AM

This is the syntax for the function, I'm sure I'm using the correct variables.

EUROCONVERT(number,source,target,full_precision,triangulation_precision)

thanks!!



Posted by Ivan Moala on May 09, 2001 3:56 PM

Try

test = Application.WorksheetFunction.EUROCONVERT(number,source,target,full_precision,triangulation_precision)


Ivan