PC Review


Reply
Thread Tools Rate Thread

Calculation Setting

 
 
=?Utf-8?B?UGFpZ2U=?=
Guest
Posts: n/a
 
      29th Jan 2007
I need to have a cell that tells the user what the current state of
calculation is (i.e., is it set to automatic or manual); this would have to
change automatically whenever calculation is changed from auto to manual or
vice versa. The workbook is normally set to auto, but the user can change
the status manually back and forth. Where/how can I insert code that would
be triggered to update whenever calc is changed, and look to see what it was
changed to? Tried putting some code under various worksheet and workbook
events, but keep getting those pesky little 'out of stack space' messages!
 
Reply With Quote
 
 
 
 
=?Utf-8?B?Sm9obiBCdW5keQ==?=
Guest
Posts: n/a
 
      29th Jan 2007
Try this out

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Application.Calculation = xlCalculationAutomatic Then Cells(1, 1) = "Auto"
If Application.Calculation = xlCalculationManual Then Cells(1, 1) = "Manual"
End Sub

--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


"Paige" wrote:

> I need to have a cell that tells the user what the current state of
> calculation is (i.e., is it set to automatic or manual); this would have to
> change automatically whenever calculation is changed from auto to manual or
> vice versa. The workbook is normally set to auto, but the user can change
> the status manually back and forth. Where/how can I insert code that would
> be triggered to update whenever calc is changed, and look to see what it was
> changed to? Tried putting some code under various worksheet and workbook
> events, but keep getting those pesky little 'out of stack space' messages!

 
Reply With Quote
 
=?Utf-8?B?Sm9obiBCdW5keQ==?=
Guest
Posts: n/a
 
      29th Jan 2007
Here you go for the whole workbook

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
If Application.Calculation = xlCalculationAutomatic Then
ActiveSheet.Cells(1, 1) = "Auto"
If Application.Calculation = xlCalculationManual Then ActiveSheet.Cells(1,
1) = "Manual"
End Sub

--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


"Paige" wrote:

> I need to have a cell that tells the user what the current state of
> calculation is (i.e., is it set to automatic or manual); this would have to
> change automatically whenever calculation is changed from auto to manual or
> vice versa. The workbook is normally set to auto, but the user can change
> the status manually back and forth. Where/how can I insert code that would
> be triggered to update whenever calc is changed, and look to see what it was
> changed to? Tried putting some code under various worksheet and workbook
> events, but keep getting those pesky little 'out of stack space' messages!

 
Reply With Quote
 
=?Utf-8?B?UGFpZ2U=?=
Guest
Posts: n/a
 
      30th Jan 2007
Thanks, John!!!

"John Bundy" wrote:

> Here you go for the whole workbook
>
> Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
> As Range)
> If Application.Calculation = xlCalculationAutomatic Then
> ActiveSheet.Cells(1, 1) = "Auto"
> If Application.Calculation = xlCalculationManual Then ActiveSheet.Cells(1,
> 1) = "Manual"
> End Sub
>
> --
> -John Northwest11
> Please rate when your question is answered to help us and others know what
> is helpful.
>
>
> "Paige" wrote:
>
> > I need to have a cell that tells the user what the current state of
> > calculation is (i.e., is it set to automatic or manual); this would have to
> > change automatically whenever calculation is changed from auto to manual or
> > vice versa. The workbook is normally set to auto, but the user can change
> > the status manually back and forth. Where/how can I insert code that would
> > be triggered to update whenever calc is changed, and look to see what it was
> > changed to? Tried putting some code under various worksheet and workbook
> > events, but keep getting those pesky little 'out of stack space' messages!

 
Reply With Quote
 
=?Utf-8?B?TWFydGluIEZpc2hsb2Nr?=
Guest
Posts: n/a
 
      30th Jan 2007
Hi Paige:

The following works for auto and semi but not for a switch to manual
(becasue the manual does not recalculate the sheet).

Function Status1()
Application.Volatile
Select Case Application.Calculation
Case xlCalculationManual
Status1 = "Manual"
Case xlCalculationSemiautomatic
Status1 = "Semi"
Case xlCalculationAutomatic
Status1 = "Auto"
End Select
End Function

You need to therefore try an on timer event unless somebody can come up with
an alternative.

--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Paige" wrote:

> I need to have a cell that tells the user what the current state of
> calculation is (i.e., is it set to automatic or manual); this would have to
> change automatically whenever calculation is changed from auto to manual or
> vice versa. The workbook is normally set to auto, but the user can change
> the status manually back and forth. Where/how can I insert code that would
> be triggered to update whenever calc is changed, and look to see what it was
> changed to? Tried putting some code under various worksheet and workbook
> events, but keep getting those pesky little 'out of stack space' messages!

 
Reply With Quote
 
NickHK
Guest
Posts: n/a
 
      30th Jan 2007
You can use the older Macro4 call.
Create a new name, maybe "CalcMode" and set it "=GET.DOCUMENT(14)"

Then in you worksheet you can enter "=CalcMode" whereever you need it.

You can enhance the formula to to return a string instead if desired.

NickHK

"Paige" <(E-Mail Removed)> wrote in message
news:CD30A3F7-366B-4680-ADD1-(E-Mail Removed)...
> I need to have a cell that tells the user what the current state of
> calculation is (i.e., is it set to automatic or manual); this would have

to
> change automatically whenever calculation is changed from auto to manual

or
> vice versa. The workbook is normally set to auto, but the user can change
> the status manually back and forth. Where/how can I insert code that

would
> be triggered to update whenever calc is changed, and look to see what it

was
> changed to? Tried putting some code under various worksheet and workbook
> events, but keep getting those pesky little 'out of stack space' messages!



 
Reply With Quote
 
=?Utf-8?B?UEJlenVjaGE=?=
Guest
Posts: n/a
 
      30th Jan 2007
Paige,
What about toggling the calculation mode with the notice in StatusBar? A
linked two-way short-key would be useful.

Private Sub AutoManuCalculation()
With Application
If .Calculation = xlCalculationAutomatic Then
.Calculation = xlCalculationManual
.StatusBar = "ATTENTION Manual calculation!"
Else
.StatusBar = False
.Calculation = xlCalculationAutomatic
End If
End With
End Sub

--
Petr Bezucha


"Paige" wrote:

> Thanks, John!!!
>
> "John Bundy" wrote:
>
> > Here you go for the whole workbook
> >
> > Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
> > As Range)
> > If Application.Calculation = xlCalculationAutomatic Then
> > ActiveSheet.Cells(1, 1) = "Auto"
> > If Application.Calculation = xlCalculationManual Then ActiveSheet.Cells(1,
> > 1) = "Manual"
> > End Sub
> >
> > --
> > -John Northwest11
> > Please rate when your question is answered to help us and others know what
> > is helpful.
> >
> >
> > "Paige" wrote:
> >
> > > I need to have a cell that tells the user what the current state of
> > > calculation is (i.e., is it set to automatic or manual); this would have to
> > > change automatically whenever calculation is changed from auto to manual or
> > > vice versa. The workbook is normally set to auto, but the user can change
> > > the status manually back and forth. Where/how can I insert code that would
> > > be triggered to update whenever calc is changed, and look to see what it was
> > > changed to? Tried putting some code under various worksheet and workbook
> > > events, but keep getting those pesky little 'out of stack space' messages!

 
Reply With Quote
 
=?Utf-8?B?UGFpZ2U=?=
Guest
Posts: n/a
 
      30th Jan 2007
Thanks everyone for all the great suggestions. Will give them a try today.
Again, appreciate it very much!

"NickHK" wrote:

> You can use the older Macro4 call.
> Create a new name, maybe "CalcMode" and set it "=GET.DOCUMENT(14)"
>
> Then in you worksheet you can enter "=CalcMode" whereever you need it.
>
> You can enhance the formula to to return a string instead if desired.
>
> NickHK
>
> "Paige" <(E-Mail Removed)> wrote in message
> news:CD30A3F7-366B-4680-ADD1-(E-Mail Removed)...
> > I need to have a cell that tells the user what the current state of
> > calculation is (i.e., is it set to automatic or manual); this would have

> to
> > change automatically whenever calculation is changed from auto to manual

> or
> > vice versa. The workbook is normally set to auto, but the user can change
> > the status manually back and forth. Where/how can I insert code that

> would
> > be triggered to update whenever calc is changed, and look to see what it

> was
> > changed to? Tried putting some code under various worksheet and workbook
> > events, but keep getting those pesky little 'out of stack space' messages!

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a bug in the automatic calculation setting? WesIsland Microsoft Excel Crashes 2 25th Sep 2008 07:08 PM
Manual calculation setting skewey Microsoft Excel Misc 1 2nd Feb 2008 04:37 PM
how to determine calculation setting? =?Utf-8?B?R29Cb2JieUdv?= Microsoft Excel Misc 1 26th Aug 2006 04:22 AM
Calculation Setting in Excel =?Utf-8?B?U3R1YXJ0IEJpc3NldA==?= Microsoft Excel Misc 0 17th Jun 2005 09:54 AM
Auto Calculation Setting =?Utf-8?B?Q2hhbmNlMjI0?= Microsoft Excel Misc 2 6th Jun 2005 04:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:48 PM.