×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

xlCalculationManual versus xlManual

xlCalculationManual versus xlManual

xlCalculationManual versus xlManual

(OP)
I run Excel 2010.  I have just noticed that in some of the VBA code I have developed over the last ten years I have used
     Application.Calculation = xlCalculationManual
while elsewhere I have used
     Application.Calculation = xlManual
(with a corresponding alternation between xlCalculationAutomatic and xlAutomatic).

Both forms work fine, which is hardly surprising since the two reserved variables have the same value of -4135.

Does anyone on this forum know why Excel (2010) has two reserved variables here, rather than just the one?
Is it because Microsoft is/was transitioning from one to the other?
If so, which one is the "new" one?

My concern here is the longevity of my spreadsheets.  If MS is/was transitioning, I would prefer to use the variable with a future rather than the one with a past.

RE: xlCalculationManual versus xlManual

If you look at enumerations in excel, there is one Constants that contains a lot of different entries, and other starting with xl and description, group specific constants and are esp. useful when the intellisense is on.

xlCalculation belongs to Constants. xlCalculationAutomatic belongs to xlCalculation. Application.Calculation property is defined as xlCalculation and after "=" vba intellisense suggests one of its members.

Both enumerations are visible, so probably both will be accessible in future. For me Application.Calculation = xlCalculationManual assignment is more secure, as it directly refers to Calculation property.

There are more similar constants. For instance, xlRight=-4152. The same value have xlHAlignRight, xlLabelPositionRight, xlLegendPositionRight and some others.

combo

RE: xlCalculationManual versus xlManual

(OP)
Many thanks.  Exactly the sort of information (and assurance) that I was hoping for as I sit here going through all my spreadsheets trying to ensure that all take pretty much the same approach to such things.  (A chap's gotta do something when he's in his fourth Covid-induced lockdown.)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close