PC Review


Reply
Thread Tools Rate Thread

Application.Calculation = xlCalculationAutomatic

 
 
Karen53
Guest
Posts: n/a
 
      1st Mar 2008
Hi,

How do I check the status of xlCalculation (Manual or Automatic) in a debug
statement?

I tried

Debug.Print "Starting NuTenant " & Application.Calculation

I'm getting results like -4105 and -4135
--
Thanks for your help.
Karen53
 
Reply With Quote
 
 
 
 
Conan Kelly
Guest
Posts: n/a
 
      1st Mar 2008
Karen,

Those are the values of the different Calculation modes.

In the VBE, hit [F2], enter "xlCalculation" in the search box. In the Search
Results box, select any of the items that have "XlCalculation" in the Class
column. Then in the "Members of 'XlCalculation'" pane below, select each
constant of the XlCalculation class, then look in the gray/tan box at the
bottom to see the values for each constant.

As far as returning the names......sorry, can't help you there.

HTH,

Conan




"Karen53" <(E-Mail Removed)> wrote in message
news:68E05BED-8DBD-49D6-A40A-(E-Mail Removed)...
> Hi,
>
> How do I check the status of xlCalculation (Manual or Automatic) in a
> debug
> statement?
>
> I tried
>
> Debug.Print "Starting NuTenant " & Application.Calculation
>
> I'm getting results like -4105 and -4135
> --
> Thanks for your help.
> Karen53



 
Reply With Quote
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      1st Mar 2008
As Conan mentioned, xlCalculationAutomatic and xlCalculationManual are
predefined constants for the numbers -4105 and -4135. By the way, there is a
3rd possible mode... 2 whose predefined constant is
xlCalculationSemiAutomatic. While somewhat ugly, you can use this statement
to print out what I think you want...

Debug.Print "Starting NuTenant: " & _
Choose(((Application.Calculation + 4165) Mod 4077) / 30, _
"xlCalculationManual", "xlCalculationAutomatic", _
"xlCalculationSemiAutomatic")

It handles all three modes; however, if you never use
xlCalculationSemiAutomatic, then you can use this somewhat shorter statement
instead...

Debug.Print "Starting NuTenant: " & _
Choose((Application.Calculation + 4165) / 30, _
"xlCalculationManual", "xlCalculationAutomatic")

Rick


"Karen53" <(E-Mail Removed)> wrote in message
news:68E05BED-8DBD-49D6-A40A-(E-Mail Removed)...
> Hi,
>
> How do I check the status of xlCalculation (Manual or Automatic) in a
> debug
> statement?
>
> I tried
>
> Debug.Print "Starting NuTenant " & Application.Calculation
>
> I'm getting results like -4105 and -4135
> --
> Thanks for your help.
> Karen53


 
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
Re: Application.Calculation = xlCalculationAutomatic Charles Williams Microsoft Excel Discussion 0 10th Nov 2008 03:42 PM
RE: Application.Calculation = xlCalculationAutomatic John Bundy Microsoft Excel Discussion 0 10th Nov 2008 02:53 PM
Re: Application.Calculation = xlCalculationAutomatic Pete_UK Microsoft Excel Discussion 0 10th Nov 2008 02:45 PM
changing calculation mode (xlCalculationAutomatic) w/o showing workbook shawshank247 Microsoft Excel Misc 2 10th Feb 2004 02:43 AM
Application.Calculation Gareth Microsoft Excel Programming 2 6th Dec 2003 01:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:44 AM.