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 / June 2006

Tip: Looking for answers? Try searching our database.

Mouseover with two VBA events

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pfx - 15 Jun 2006 06:07 GMT
Hi Steve,

I hope you don't mind me raising the topic again but I was hoping to find
out if my query relating to mouseovers was first of all 'doable' and secondly
if I could borrow some of your time in achieving a solution.

You will remember resolving my first query in getting a mouseover event to
swap text regardles of being on a master or presentation slide.

The followup to this is setting up a highlight on the button that stays
active while the mouse hovers over the button rather than quickly switching
off in the default PowerPoint fashion.

I know you provided a solution for this but I was hoping this VBA script
could be combined with the swap text VBA solution as PowerPoint only allows
for one mouseover event at a time.

The original VBA script was:

Sub DisplayMessage(oShp As Shape)
' The shape's. Parent will be either the slide or master ' it's on; this way
you don't have to worry which
With oShp.Parent.Shapes("Slide Navigator").TextFrame.TextRange
.Text = oShp.Name DoEvents
End With
End Sub

And the most recent script is:

Sub HighlightMe(oSh As Shape)
oSh.Fill.ForeColor.RGB = RGB(255, 255, 0)
' make it yellow ' and give it a name so we can grab it later
oSh.Name = "CatchMeIfYouCan"
End Sub

Sub RemoveHighlight(oSh As Shape)
Dim oSl As Slide
Set oSl = oSh.Parent
' grab the highlighted shape
On Error Resume Next
With oSl.Shapes("CatchMeIfYouCan")
.Fill.ForeColor.RGB = RGB(0, 0, 255)
' Rename it something random
Randomize
.Name = CStr(Rnd())
End With
End Sub

I've had a crack at combining the two into one consolidated VBA script but
without success.

I would really appreciate your assistance if you have the time.

Thanks

PFX
Steve Rindsberg - 15 Jun 2006 16:39 GMT
> Hi Steve,

Hi ... saw your other post and have it marked for when I get a few more minutes
to think about it;  haven't had that so far, sorry!

> I hope you don't mind me raising the topic again but I was hoping to find
> out if my query relating to mouseovers was first of all 'doable' and secondly
[quoted text clipped - 50 lines]
>
> PFX

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
pfx - 16 Jun 2006 02:23 GMT
Hi Steve,
Thanks for getting back to me.
Whenever you've got some time to have a look at it would be great.
Regards
Chris

> > Hi Steve,
>
[quoted text clipped - 61 lines]
> PPTools:  www.pptools.com
> ================================================
pfx - 23 Jun 2006 02:50 GMT
Hi Steve,

Just wondering if you've had a chance to have a look at my query. I
appreciate that you're giving your time freely.
I understand that this query requires a little more investigation than usual.
There is another part to it that may or may not have an easier/more
immediate solution.
Is it possible for the mouseover event to trigger not only the swapping of
text in another box but also swapping of an image in a second location. As
the mouse passes over a button, a picture appears in a separate location and
the text describing the picture also appears in a separate box.
Hope this is possible either with or without the button highlight in my
query below.
If the above is not immediately possible it would be good to know the code
for mouseover - swap image, as against the code for mouseover - swap text as
you have already provided. If you have a VBA in PowerPoint book, I'll buy it!
My followup query is prompted by a closing deadline for this (major) project.
Thanks for your time and responses.
Chris

> Hi Steve,
> Thanks for getting back to me.
[quoted text clipped - 67 lines]
> > PPTools:  www.pptools.com
> > ================================================
David M. Marcovitz - 23 Jun 2006 15:48 GMT
On my Web site, I have added a mouse over "swapping event." Actually, it
doesn't involve swapping, but it easily could. I simply have one picture
cover up another one (as an example of a hover button). Just go to my Web
site:

http://www.PowerfulPowerPoint.com/

Click on "More Tricks" and look for Trick #10.

As for your question about having one mouse over do two things, that is
the beauty of VBA. A mouse over will only run one macro, but that macro
can do as many things as you want (including calling other macros).

As far as books go, unfortunately, there aren't a lot of choices. There
is only one book that really focuses on VBA and PowerPoint. It's not
complete and comprehensive, but it works for beginners to get started
writing macros like the ones you are describing. The examples on my site
under "Examples by Chapter" are from the book. The book contains
descriptions of how the examples work, so if you like what you see on the
site, then click on "Buy the Book."

--David

Signature

David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/

> Hi Steve,
>
[quoted text clipped - 91 lines]
>> > PPTools:  www.pptools.com
>> > ================================================
Steve Rindsberg - 23 Jun 2006 21:22 GMT
> Hi Steve,
>
[quoted text clipped - 9 lines]
> Hope this is possible either with or without the button highlight in my
> query below.

It should be, so long as the mouseover triggers a macro.  The macro can do pretty much
whatever you need it to.

> If the above is not immediately possible it would be good to know the code
> for mouseover - swap image, as against the code for mouseover - swap text as
[quoted text clipped - 74 lines]
> > > PPTools:  www.pptools.com
> > > ================================================

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
 
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.