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 / March 2008

Tip: Looking for answers? Try searching our database.

Object Appears on Another Slide

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Desmond777 - 31 Mar 2008 10:46 GMT
I am trying to make a game that will allow the player to have an inventory. I
need a way to have an object appear in the inventory when another objects is
"mouse-overed."
Can someone give me the VBA code for this?
Thanks!
vindys - 31 Mar 2008 11:24 GMT
You have actionSettings for mouse over.
So write a action setting to run a macro and in the macro set the
vissibility of the object as vissible (msoTrue)

> I am trying to make a game that will allow the player to have an inventory. I
> need a way to have an object appear in the inventory when another objects is
> "mouse-overed."
> Can someone give me the VBA code for this?
> Thanks!
Desmond777 - 31 Mar 2008 13:10 GMT
.. sorry I'm a noob with vb. Also what if the object was an autoshape?

> You have actionSettings for mouse over.
> So write a action setting to run a macro and in the macro set the
[quoted text clipped - 5 lines]
> > Can someone give me the VBA code for this?
> > Thanks!
vindys - 31 Mar 2008 14:17 GMT
Hi Desmond,

As I dont know whats the exact way you doing
So I feel only one way

Select the object which you want to keep vissible and to set actionsettings
for mouse over and run this function

Sub PrepareVissibleShape()
With ActiveWindow.Selection.ShapeRange(1)
   .Visible = msoTrue
   .Name = "VissibleObj"
   .ActionSettings(ppMouseOver).Action = ppActionRunMacro
   .ActionSettings(ppMouseOver).Run = MakeShapeVissible
End With
End Sub

Now Select the shape which you want to make invissible and run this macro
Sub PrepareInvissibleShape()
With ActiveWindow.Selection.ShapeRange(1)
   .Visible = msoFalse
   .Name = "InvissibleObj"
End With
End Sub

Also keep this macro in the same module
Sub MakeShapeVissible()
Dim sh As Shape
For i = 1 To ActivePresentation.Slides(1).Shapes.Count 'Change Slide index
accrodingly
   With ActivePresentation.Slides(1).Shapes(i)
       If .Name = "VissibleObj" Then
           .Visible = msoFalse
       ElseIf .Name = "InvissibleObj" Then
           .Visible = msoTrue
       End If
   End With
Next i
End Sub

Now you try slideshow and see if it works.
Check this website if you don't know where to write VBA code
http://pptfaq.com/FAQ00033.htm

> .. sorry I'm a noob with vb. Also what if the object was an autoshape?
>
[quoted text clipped - 7 lines]
> > > Can someone give me the VBA code for this?
> > > Thanks!
John Wilson - 31 Mar 2008 14:18 GMT
Does it have to be a mouseover? A triggered animation is likely to be more
reliable but this would have to be a click.

Can you explain " .... on another slide" though. If you need an object to
appear on a DIFFERENT  slide then it would have to be vba.

Using vba to set the visible property can cause problems with other
animations and also once set to true or false it will stay that way next time
you run the presentation unless you write code to initialise it how you want.

tutorials on triggers
http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html#triggers
Signature

Amazing PPT Hints, Tips and Tutorials

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

> .. sorry I'm a noob with vb. Also what if the object was an autoshape?
>
[quoted text clipped - 7 lines]
> > > Can someone give me the VBA code for this?
> > > Thanks!
David M. Marcovitz - 31 Mar 2008 16:18 GMT
The basic code is:

ActivePresentation.Slides(###).Shapes(###).Visible = msoTrue

This makes an object on another slide visible. Change msoTrue to
msoFalse to make the object invisible. You replace the ###s with slide
and shape numbers or names. I have examples of the basic idea on my Web
site. Most of them change the visibility of an object on the same slide,
but some of the examples change it on another slide. Go to
http://www.PowerfulPowerPoint.com/ and look at some of the examples.
Example 6.6 is probably the simplest example of this. Just click on
"Examples by Chapter" and "Chapter 6."

--David

Signature

David M. Marcovitz
Microsoft PowerPoint MVP
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/

> I am trying to make a game that will allow the player to have an
> inventory. I need a way to have an object appear in the inventory when
> another objects is "mouse-overed."
> Can someone give me the VBA code for this?
> Thanks!
 
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.