Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Defined Forumla and persistence
Hi,
I have a new problem with Excel... and it appear to me in the world of the "User Defined Formulas". If I write a new formula like this (into a VBA module): Function TEST(RngName As String, Optional FncName As String = "SUM") As Variant Application.Volatile Dim TheCaller As Range Set TheCaller = Application.Caller Dim R As Range Set R = ActiveWorkbook.Names(RngName).RefersToRange TEST = Application.Evaluate(FncName & "(" & R.Address & ")") End Function and I use it in a sheet (e.g. "Sheet 1") it works fine... but when I go to another sheet (e.g. "Sheet 3") and I forse a recalculus (F9 shortcut) when I return to "Sheet 1" the function show the 0 (ZERO) value :( Why? Something idea? Thanks in adavance Eros Pedrini |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
"User-defined type not defined" message in Excel | Excel Discussion (Misc queries) | |||
Workspace faux user-defined type not defined | Excel Programming | |||
User-defined data type; Error: Only User-defined types... | Excel Programming | |||
User Defined type not defined | Excel Programming | |||
Word.Document - user defined type not defined | Excel Programming |