show / hide shapes window RELIABLY in VBA

V

vojo

trying to show/hide shapes window reliably.
Visio.application.docmd (1669) does NOT work reliably

Works about 70%....hides 7 out of time times...always shows on return...
same drawing. I do realize it toggles the show/hide with every call
(10 times means 10 hides...do soemthing...10 shows).

Is there some modal orderness here with other commands like
showtoolbars or showstatus.

I tried adding doevents, updateUI, pause for 5 seconds....all in case it needs
time to work through the shapes hide.

Note I did try windowstate/UIobject approachs...different behavior (floating
window) but could not make shapewindow dissappear at all (0%).

What I am looking for is a VBA "hammer" hide this window reliably!!!!!
The showtoolbars and showstatus work 100% of the time.

VBA doc on shapes window is poor in this area.
(why have a command called openstencilwindow and not have a command
closestencilwindow)

Any all help appreciated.
 
J

JuneTheSecond

Hi,

My idea is to test the docmd alone on the simple new drawing.
And to analize what is the reason by adding shapes or macros to the drawing
step by step until you catch the cause.
 
V

vojo

there is a modality aspect here

need to back out in the reverse order going in

hide shape window
hide toolbar
etc

do soemthing

etc
show toobar
show shape window
 

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

Top