View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
Ed Davis[_2_] Ed Davis[_2_] is offline
external usenet poster
 
Posts: 67
Default Linking cells from the previous sheet

After adding this line of code it is taking about 4 to 5 seconds to
calculate each cell I change.
With over 300 cells at a time it would take forever to calculate the whole
sheet.


--
Thank You in Advance
Ed Davis
"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Try adding Application.Volatile as such......

Function PrevSheet(rg As Range)
Dim N As Variant
Application.Volatile 'added this line
With Application.Caller.Parent
N = .Index
Do
If N = 1 Then
PrevSheet = CVErr(xlErrRef)
Exit Do
ElseIf TypeName(.Parent.Sheets(N - 1)) < "Chart" And _
.Parent.Sheets(N - 1).Visible = xlSheetVisible Then
PrevSheet = .Parent.Sheets(N - 1).Range(rg.Address).Value
Exit Do
End If
N = N - 1
Loop
End With
End Function

Don't know why I left that out..........weekend brain in gear when we were
working on your emailed workbook.


Gord

On Tue, 6 Oct 2009 20:25:02 -0300, "Ed Davis"
wrote:

Hi Gord
I have found that the links do not update.
I have to hit F2 and enter for them to update.
I have auto calc on but even if I recalc they do not update.
It does not happen every time but does happen most of the time.