Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Excel VBA code works during debug or with message box but not during runtime..

I have VBA code creating a chart from a worksheet but it works inconsistently
during runtime whereby, sometimes I need to click once on the worksheet to
show the chart and other times, the chart comes out OK.

However, if I step thru the code, I don't get the problem above and also
when I use a message box to halt the process and resume after clicking the
OK button.

Any ideas ?

Sanjay
[434 byte] By [Sanjay] at [2007-11-10 12:23:11]
# 1 Re: Excel VBA code works during debug or with message box but not during runtime..
A loooooooooooooooong-shot, but I have had similar inconsistancies in my code runs and thus far have found the most likely suspect to be unfully qualified properties:

i.e.

If checkbox3 then...

as oppsed to:

If checkbox3.value then...

I know it seems trivial, but it's where I start looking anymore!

Hope this helps,

w00fer
w00fer10 at 2007-11-11 17:44:16 >