Explanation of Code comments

  • Thread starter Thread starter rob nobel
  • Start date Start date
R

rob nobel

Within VBA code, when the mouse pointer is above some of the code (if the
procedure is debugged), a yellow box is displayed giving some details of
that code.

I notice that sometimes values are given, for instance...
Application.Calculation = xlCalculationManual shows a value of "-4135"
unless that whole line is highlighted with the mouse, in which case it shows
"Application.Calculation = xlCalculationManual=true".
Can someone explain the meaning/purpose of this and why the different value
given?

In other cases I have something like Sheet7.EnableSelection =
xlUnlockedCells which shows in the comment box...
"Sheet7.EnableSelection = ...=<Object variable or with block variable not
set>"
This makes me think that line is not actually functioning properly??
(Although it appears it is.)
(It doesn't change even if I have it in the With method.)

Rob
 
Rob,

When you put your mouse over the xlCalculationManual constant,
VBA displays the value of that constant, which is -4135. When
you highlight the entire line, VBA evaluates the entire
comparison, testing whether Application.Calculation is equal to
xlCalculationManual and displays the result of that comparison,
which will be either True or False.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Back
Top