Auto Calculate selected worksheets

G

garygoodguy

I have set my workbook to manual formula calculation via File --
Options --> Formula --> calculation options --> manual. The reason i
that the workbook is very large with a number of calcs.

Now what I want to do is have only one worksheet to auto calculated
while the rest are still manual. How can I achieve this, and in wha
private sub/sub do I place the code?

I have tried worksheet("worksheet name").EnableCalculate = True
And placed it under Workbook_Open, but this doesn't work.

I'm looking for a way to have this one sheet always calculate (a
opposed to active sheet, etc) as the sheet will be hidden.

Also, when I go into the sheet code of the sheet I want to be automatic
EnableCalculation in properties is set to True. How does this affec
thing's?

Thanks in advanc
 
G

GS

garygoodguy laid this down on his screen :
I have set my workbook to manual formula calculation via File -->
Options --> Formula --> calculation options --> manual. The reason is
that the workbook is very large with a number of calcs.

Now what I want to do is have only one worksheet to auto calculated,
while the rest are still manual. How can I achieve this, and in what
private sub/sub do I place the code?

I have tried worksheet("worksheet name").EnableCalculate = True
And placed it under Workbook_Open, but this doesn't work.

I'm looking for a way to have this one sheet always calculate (as
opposed to active sheet, etc) as the sheet will be hidden.

Also, when I go into the sheet code of the sheet I want to be automatic,
EnableCalculation in properties is set to True. How does this affect
thing's?

Thanks in advance

When calc is in manual mode you must execute the Calculate method to
cause calculation. This will happen for every sheet where
EnableCalculation is turned on (=True)...

Application.Calculate
OR
Sheets(1).Calculate
OR
Sheets(1).Rows(2).Calculate
OR
Sheets(1).Columns(2).Calculate
OR
Sheets("Sheet1").UsedRange.Columns("A:C").Calculate


HTH

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
 
G

garygoodguy

Thanks Garry.

If I understand you correctly, I can still have the options calc set t
manual; but would have to put code into any sheet that I want t
calculate automatically?

So if I were to utilise:
Sheets("Sheet1").UsedRange.Columns("A:C").Calculate

Where would I place this code? I'm assuming in the sheet, i.e Sheet1
Under what private sub?
Or would I place this under Workbook_open in 'ThisWorkbook'?

Thanks in advance.



'GS[_2_ said:
;1608859']garygoodguy laid this down on his screen :-
I have set my workbook to manual formula calculation via File -->
Options --> Formula --> calculation options --> manual. The reason is
that the workbook is very large with a number of calcs.

Now what I want to do is have only one worksheet to auto calculated,
while the rest are still manual. How can I achieve this, and in what
private sub/sub do I place the code?

I have tried worksheet("worksheet name").EnableCalculate = True
And placed it under Workbook_Open, but this doesn't work.

I'm looking for a way to have this one sheet always calculate (as
opposed to active sheet, etc) as the sheet will be hidden.

Also, when I go into the sheet code of the sheet I want to b automatic,
EnableCalculation in properties is set to True. How does this affect
thing's?

Thanks in advance-

When calc is in manual mode you must execute the Calculate method to
cause calculation. This will happen for every sheet where
EnableCalculation is turned on (=True)...

Application.Calculate
OR
Sheets(1).Calculate
OR
Sheets(1).Rows(2).Calculate
OR
Sheets(1).Columns(2).Calculate
OR
Sheets("Sheet1").UsedRange.Columns("A:C").Calculate


HTH

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussio
 
G

garygoodguy

Disregard the last post.
I have placed:

Sheets("Sheet1").UsedRange.Columns("A:C").Calculate

in Private Sub Worksheet_Activate()

And it works perfectly.
Thanks a bunch.
 
G

GS

garygoodguy explained :
Where would I place this code? I'm assuming in the sheet, i.e Sheet1?
Under what private sub?
Or would I place this under Workbook_open in 'ThisWorkbook'?

It depends when you want it to calculate! If when the file opens then
in the Workbook_Open event. If before the file closes then in the
Workbook_BeforeClose event. If when you click a button or custom
menuitem then in a standard module sub named appropriate to its use.

Sub CalculateSheet()
Sheets("Sheet1").UsedRange.Columns("A:C").Calculate
End Sub

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top