Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have been using the following code in VBA with the PriorSheet function in a
cell successfully in Excel 2003. However, it is bombing in Excel 2007 (Vista). Anyone have an update that will work in 2007? Thanks! Function PriorSheet(PriorCell As Variant) As Variant Application.Volatile PriorSheet = Application.Caller.Parent.Previous.Range(PriorCell .Address) End Function |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try declaring priorcell as Range
Function PriorSheet(PriorCell As Range) As Variant Application.Volatile PriorSheet = Application.Caller.Parent.Previous.Range(PriorCell .Address) End Function Make sure the function isn't in a sheet module, but in a general module. -- Regards, Tom Ogilvy "David" wrote: I have been using the following code in VBA with the PriorSheet function in a cell successfully in Excel 2003. However, it is bombing in Excel 2007 (Vista). Anyone have an update that will work in 2007? Thanks! Function PriorSheet(PriorCell As Variant) As Variant Application.Volatile PriorSheet = Application.Caller.Parent.Previous.Range(PriorCell .Address) End Function |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy of excel file not showing formulal/function in the function b | Excel Discussion (Misc queries) | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Priorsheet Function Problem | Excel Worksheet Functions | |||
Excel - User Defined Function Error: This function takes no argume | Excel Programming | |||
Need to open the Function Arguments window from VBA for a user defined function. | Excel Programming |