Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / February 2008

Tip: Looking for answers? Try searching our database.

PPT 2007 VBA: How to force refresh of window?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave Jenkins - 23 Feb 2008 14:43 GMT
I'm guessing this has been asked and answered, but I can't seem to find the
solution.

I have an application selects a shape on the active window and then puts up
a MsgBox.  In debug, that all works ok, but in actual running, when the
MsgBox goes up, the shape's not showing as selected.  Once the MsgBox clears,
the shape *does* show as selected.

I'm guessing I need to force a refresh of the window after the select, but
before the MsgBox, but I can't find out how to do that.  Is it possible via
VBA?  Do I need to use a Windows API call?  And if so, which one and how do I
code it?

Thanks.
Signature

Dave Jenkins
K5KX

John Wilson - 23 Feb 2008 16:14 GMT
The shape won't show as selected till the sub ends. Maybe you could try using
a modeless form instead of a msgbox?
Signature

Amazing PPT Hints, Tips and Tutorials

http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk
email john AT technologytrish.co.uk

> I'm guessing this has been asked and answered, but I can't seem to find the
> solution.
[quoted text clipped - 10 lines]
>
> Thanks.
Dave Jenkins - 23 Feb 2008 17:18 GMT
Thanks, John.

Beore I go to the trouble of shifting to a form, are you telling me that
there's not even an API call I can make that will show the selection handles?

(Based on what you said, I tried putting the select in its own sub(), but
when I exited that and then issued the MsgBox, the shape still showed as
unselected. :-( )

Signature

Dave Jenkins
K5KX

> The shape won't show as selected till the sub ends. Maybe you could try using
> a modeless form instead of a msgbox?
[quoted text clipped - 13 lines]
> >
> > Thanks.
Brian Reilly, MVP - 23 Feb 2008 19:35 GMT
Dave,
Shyam Pillai, a fellow MVP, has sample code on his web site to
determine what shape was clicked. You could save that ShapeName to a
variable and after dismissing the Msgbox just select it again via the
variable name.

Brian Reilly, MVP

>Thanks, John.
>
[quoted text clipped - 4 lines]
>when I exited that and then issued the MsgBox, the shape still showed as
>unselected. :-( )
Dave Jenkins - 23 Feb 2008 21:25 GMT
Hi, Brian - thanks.

The problem is: the user has to make a decision based on what he sees as far
as the selected shape goes.  Dismissing the MsgBox and *then* showing the
shape involved kind of puts the cart before the horse, in this siuation.

Upon reflection, I think the idea of a modeless form will work quite well -
the user will get the message, see the selection, and can edit or what-have
you and then select choices from the modeless msgbox.

I think I'll give that a try.
Signature

Dave Jenkins
K5KX

> Dave,
> Shyam Pillai, a fellow MVP, has sample code on his web site to
[quoted text clipped - 12 lines]
> >when I exited that and then issued the MsgBox, the shape still showed as
> >unselected. :-( )
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.