Visio Guy

Visio Discussions => Programming & Code => Topic started by: paulv45 on May 08, 2022, 01:49:40 AM

Title: What does in mean when code runs in debug but not in operation?
Post by: paulv45 on May 08, 2022, 01:49:40 AM
I am manipulating shape text.
When I do:
objChar.CharProps(visCharacterSize) = 8#
Code runs fine when in debugger using <f8> to step through.
When run normally it exhibits bad behavior.

Is there anything in general this implies?

If I precede the line with a MsgBox to force user interaction, also runs fine.

I've tried update false/true and timer.

Any thoughts?
Title: Re: What does in mean when code runs in debug but not in operation?
Post by: Yacine on May 08, 2022, 09:36:48 AM
I know Wapperdude tried it already, but can you too try putting a doevents, once before and once after the assignment?
Title: Re: What does in mean when code runs in debug but not in operation?
Post by: paulv45 on May 10, 2022, 02:02:38 AM
I did the DoEvents before and after and that fixes the problem.
Tried just before and that also works.
Tried just after and that, not surprisingly to me, fails.
I think we have a fix.
Thanks so much, Yacine.  Nice work.