Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
i've defined the following user-defined function. It references a cell on the previous sheet relative to the current cell's (the caller) position. Function PreviousWorksheet(RelativeRow, RelativeColumn As Integer) As Variant If Application.Caller.Worksheet.Name = "First sheet" Then PreviousWorksheet = 0 Else PreviousWorksheet = Application.Caller.Worksheet.Previous.Cells (Application.Caller.Row + RelativeRow, Application.Caller.Column + RelativeColumn).Value End Function When changing the cell the function is referencing to the value is not updated. Only when I force the calculation (pressing enter, copying the cell,.. but not F9) the function is reevaluated. Other, simpler functions give no problem so maybe it has to do with how the function is defined (the caller function). Any solutions? Or maybe there's an easier solution to reference the previous sheet in EXCEL97. (A normal reference to the sheet won't do as i want the function to work even if I copy the sheet, with a normal reference all copied sheets reference the original sheet and not the previous) Thanks Bart |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
User Defined Function Help | Excel Worksheet Functions | |||
User defined function returns imprecise value when used in worksheet | Excel Discussion (Misc queries) | |||
User Defined Function use any worksheet | Excel Discussion (Misc queries) | |||
User Defined function - Help | Excel Worksheet Functions | |||
Inefficient Calculation of User Defined Functions in Excel 2000 | Excel Programming |