Marco to setup Enablecalculation to False and macro to setup Enablecalculation to True.

ebeyert

Active Member
Joined
Sep 15, 2006
Messages
287
All,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
Can someone help me with two macros for my worksheet: HR Planning (the macro only needs to be for this worksheet)<o:p></o:p>
<o:p></o:p>
One macro to setup Enablecalculation to False and one macro to setup Enablecalculation to true. <o:p></o:p>
<o:p></o:p>
I am trying with: <o:p></o:p>
<o:p></o:p>
Macro 1: <o:p></o:p>
<o:p></o:p>
Sub CalculationFalse<o:p></o:p>
ThisWorksheet (HRPlanning). Enablecalculation =False<o:p></o:p>
End Sub<o:p></o:p>
<o:p></o:p>
<o:p></o:p>
Marco 2: <o:p></o:p>
Sub CalculationTrue
ThisWorksheet (HRPlanning). Enablecalculation =True<o:p></o:p>
End Sub<o:p></o:p>
<o:p></o:p>
But as you can see, I am not a macro user.. J<o:p></o:p>

Thanks in advantage,
Best regards
Ellerd
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Try

Code:
Sub CalculationFalse()
ThisWorksheet.Sheets("HRPlanning").EnableCalculation = False
End Sub


Sub CalculationTrue()
ThisWorksheet.Sheets("HRPlanning").EnableCalculation = True
End Sub
 
Upvote 0
Try:
Rich (BB code):
Sub CalculationFalse ()
Sheets("HRPlanning").Select
Application.Calculation = xlCalculationManual
End Sub
And
Rich (BB code):
Rich (BB code):
Rich (BB code):
Sub CalculationTrue
Sheets("HRPlanning").Select
Application.Calculation = xlCalculationAutomatic
End Sub

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
 
Upvote 0
Thanks for your quick reply.

I receive this message if I use VoG macro:
Run-Time error “424”
Object required


I receive this message if I use JackDanIce
Run-time error “9”:
Subscript out of range.


I only want that I can turn EnableCalculation on and off for the worksheet HR Planning.

I hope that you can help me
Thank
Best regards
Ellerd
 
Upvote 0
Try

Code:
Sub CalculationFalse()
ThisWorkbook.Sheets("HR Planning").EnableCalculation = False
End Sub


Sub CalculationTrue()
ThisWorkbook.Sheets("HR Planning").EnableCalculation = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,843
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top