Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello
I'm writing a function which should perform its action, put a text of what it did in a certain cell (passed by the user as a reference parameter) and return the error status of the action. That would be something like this: function foo(parameter1 as string, outcell as string) <here goes the real functions code if success then Range(outcell).FormulaR1C1 = "all went ok" foo = "TRUE" else Range(outcell).FormulaR1C1 = "something made a boo boo" foo = "FALSE" endif end function When it goes through the line which uses the range, it throws a 1004 error. I have tried using Formula, Value, Cells(1,1).value, etc but the same error occurs. However, if i do the same from another function (which gets called by a menu) it works. Now i wonder if it's possible to do this, or how exactly, as i've tried all i can think about. Thanks in advance, Sergio Aguayo |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Unable to modify 2007 file on NAS server shared drive | Excel Discussion (Misc queries) | |||
Unable to modify the level of protection of macro | Excel Discussion (Misc queries) | |||
i am unable to add, delete or modify in excel or word. | Setting up and Configuration of Excel | |||
How a function can modify a value from some cells ? | Excel Programming | |||
to modify cells from a function | Excel Programming |