A
Antek Laczkowski
Hi
The following code in VB (excel 2000):
----------- start code
function f(x as double) as double
cells(1,1) = "A"
f = x + 2
end function
----------- end code
produces #ARG error when inserted into a worksheet.
The offending line is:
cells(1,1) = "A"
Does it mean I can't change worksheet cells from inside
a function ? But macros do it.
What I'm doing wrong, or is there a way around ?
Best greetings
Antek, Warsaw, Poland
The following code in VB (excel 2000):
----------- start code
function f(x as double) as double
cells(1,1) = "A"
f = x + 2
end function
----------- end code
produces #ARG error when inserted into a worksheet.
The offending line is:
cells(1,1) = "A"
Does it mean I can't change worksheet cells from inside
a function ? But macros do it.
What I'm doing wrong, or is there a way around ?
Best greetings
Antek, Warsaw, Poland