Visio Guy

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

Title: What does in mean when code runs in debug but not in operation?
Post by: paulv45 on May 07, 2022, 08:49:40 PM
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, 04: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 09, 2022, 09:02:38 PM
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.