View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default VBA setting formula for a cell causes "Wrong data type" error

Range("A1").Formula = strFormula
Calculate

would be illegal in a User defined function used in a worksheet.

A formula can only return a value to the cell in which it is used. It can't
change other cells or event he cell in which it is contained. Commands like
that will cause a #Value.

I didn't see where you are using the arguments in your function.

--
Regards,
Tom Ogilvy




"undercups" wrote:

Bob

I have already tried that. No joy.