Function arguments without quotation marks

  • Thread starter Thread starter marco
  • Start date Start date
M

marco

Hi group, again. One tricky question (I think). Is it at all
possible to pass arguments to a function without using quotation
marks? One example:

Function t(nome)
t = nome
End Function

On cell A1:

=t(abc)

Doing this I get on the cell the "#NAME?" error, and doing:

t = CStr(nome)

I get on the cell "Error 2029". However, doing:

=t(123)

No error happens. I don't know exactly why numbers can be passed
without quotation marks (but I think that it's because all non-numbers
are characters and characters are strings, maybe?)

Nevertheless, I would like to be able to use custom functions without
doing =t("abc"), but instead =t(abc)

Is it at all possible?

Sincere regards,
Marco
 
I don't think it is possible as when you do abc without quotes it could be a
range name or maybe something else. What you can do though is put abc in a
different cell and refer to that cell.

RBS
 
I don't think it is possible as when you do abc without quotes it could be a
range name or maybe something else. What you can do though is put abc in a
different cell and refer to that cell.

RBS













- Show quoted text -

That's what I thought. Thanks a lot RBS.

Marco
 
Back
Top