Thread: Updating Issue
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
broro183[_115_] broro183[_115_] is offline
external usenet poster
 
Posts: 1
Default Updating Issue


Hi Gordon,

Sorry for not getting back to you sooner - I've been away from home.

I'm just learning too but I had a play & came up with the following
(hard to test b/c I don't have your problem at the moment), try pasting
the following code into your "thisworkbook" module:

Option Explicit
Private Sub Workbook_Open()
'KickStartCalcs
Application.ScreenUpdating = False
'found this when playing - it may help...
If Application.CalculationState = xlDone Then
MsgBox "Calculation is uptodate when file opened."
Else
MsgBox "Needs to calculate - being done now..."
Application.CalculateFull
End If

Dim ws As Worksheet
Dim OriginalSheet As Worksheet
Dim OriginalCell As Range
Dim EqtnRange As Range
Dim cell As Range
'To id original location for return after macro has run.
Set OriginalSheet = ActiveSheet
Set OriginalCell = ActiveCell

For Each ws In ThisWorkbook.Worksheets
With ws
..Select
'23 was the value when I recorded a macro using "go to" all _
types of formulae ([F5], Special, Formulas - all ticked)
Set EqtnRange = .Cells.SpecialCells(xlCellTypeFormulas, 23)
For Each cell In EqtnRange
'The following should save the need for clicking _
into all the cells
cell.Activate
Next cell
End With
Next ws

'return to starting point & free memory
OriginalSheet.Select
OriginalCell.Select
Set EqtnRange = Nothing
Set OriginalSheet = Nothing
Set OriginalCell = Nothing

MsgBox "Every cell with a formula in this workbook has been
activated."
Application.ScreenUpdating = True
End Sub


hth
Rob Brockett
NZ
Always learning & the best way to learn is to experience...


--
broro183
------------------------------------------------------------------------
broro183's Profile: http://www.excelforum.com/member.php...o&userid=30068
View this thread: http://www.excelforum.com/showthread...hreadid=568250