View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
K Dales[_2_] K Dales[_2_] is offline
external usenet poster
 
Posts: 1,163
Default N/A # and error 2015

It is OK to have a variant to hold a float, so I don't think that is it. But
one thing is that in your sample at least you seem to have changed the
variable nav to roomvalue, so roomvalue was never declared with a type. I
think you mean to have the Dim statement to be Dim roomvalue as variant.

However, that may not be the problem - it could be in your functions, either
Client() or getpreviousday(). Also, you never initialize currentdate so the
first time through your call to Client that is evaluated would be
Client("CLIENT", , "ROOM", "") - is this what you want, and will Client()
accept a blank string as the date here?

Hard to say any more without knowing which line of code is giving the error
and also what is the code behind your functions.
--
- K Dales


"ina" wrote:

Hello to all,

I have this while with this condition:

dim nav as variant

roomvalue= CVErr(xlErrNA)


While IsError(roomvalue) 'while nav is error "this formula = n/A# ,
I do the formula

StrFormula2 = "Client(""CLIENT"", " & name & ", ""ROOM"", """ &
currentdate & """)"
roomvalue= Evaluate(StrFormula2)
currentdate = getpreviousday(currentdate)

Wend

But I have an error 2015 and I do not understand why? roomvalue is a
float number and I declared it as variant; could it be a problem

ina