Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 333
Default Application.Calculation = xlCalculationAutomatic

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 419
Default Application.Calculation = xlCalculationAutomatic

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" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Application.Calculation = xlCalculationAutomatic

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" wrote in message
...
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
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application.Calculation Problems Jive Excel Worksheet Functions 2 February 7th 08 02:21 PM
Application.Calculation = xlCalculationManual mystery David Excel Programming 2 July 13th 05 09:56 AM
Application.Calculation Gareth[_3_] Excel Programming 2 December 6th 03 01:53 PM
Application Calculation Error Rick B[_4_] Excel Programming 2 December 2nd 03 08:49 PM
Application.Calculation exception Bill Lunney Excel Programming 0 July 29th 03 04:46 PM


All times are GMT +1. The time now is 04:50 AM.

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"