Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default WorksheetsEnableCalculation

Help the village idiot here.
Am trying to keep a large worksheet from calculating with the other
sheets in the workbook.
Worksheet named "Bob" has no cells in other sheets that are dependant on
it. It simply collects data & does calculations.
I have this little code for "Bob"

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Worksheets("Bob").EnableCalculation = True
End Sub

and this for the other sheets:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Worksheets("Bob").EnableCalculation = False
Worksheets("Ted").EnableCalculation = True
End Sub

if i go to "Bob" and calculate, then go to any other sheet, the first
time i hit enter, it recalculates every thing, including "Bob".
Subsequent entries do not. Why?

Related question - is there any way to do this little bit of code so i
don't have to edit it every time a sheet is added or deleted?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 339
Default WorksheetsEnableCalculation


"Hugh" not.com" wrote in message
...
Help the village idiot here.
Am trying to keep a large worksheet from calculating with the other
sheets in the workbook.
Worksheet named "Bob" has no cells in other sheets that are dependant on
it. It simply collects data & does calculations.
I have this little code for "Bob"

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Worksheets("Bob").EnableCalculation = True
End Sub

and this for the other sheets:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Worksheets("Bob").EnableCalculation = False
Worksheets("Ted").EnableCalculation = True
End Sub

if i go to "Bob" and calculate, then go to any other sheet, the first
time i hit enter, it recalculates every thing, including "Bob".
Subsequent entries do not. Why?

Related question - is there any way to do this little bit of code so i
don't have to edit it every time a sheet is added or deleted?


Excel does not remember how a workbook has been calculated. The first time
you hit enter, excel has to build some kind of dependency tree. The second
time is different, now excel knows that no other sheet depends on the "Bob"
sheet.

/Fredrik


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"