Invalid watch expression

  • Thread starter Thread starter davegb
  • Start date Start date
D

davegb

I looked in Walkenbach and did a search here, but couldn't find
anything in either about this error when I run a line of code in the
Immediate window, "Invalid Watch Expression". Does anyone know what it
means?
 
Is the object fully qualified, i.e. not something like

?.Range("A1").Value

but

?activeworkbook.Range("A1").Value

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
That was it Bob! What does the "?" do?


Bob said:
Is the object fully qualified, i.e. not something like

?.Range("A1").Value

but

?activeworkbook.Range("A1").Value

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
That is effectively a print statement in the immediate window. Very useful
when debugging to stop execution at some point and check the value of a
variable. Similar to watch, but not updated as the value changes, but you
can also get the values of items that are not in the code but may give you
cause for concern.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Thanks for the explanation, Bob.

Bob said:
That is effectively a print statement in the immediate window. Very useful
when debugging to stop execution at some point and check the value of a
variable. Similar to watch, but not updated as the value changes, but you
can also get the values of items that are not in the code but may give you
cause for concern.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top