Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Houston, Tx, USA
    Posts
    121
    Thanks
    0
    Thanked 0 Times in 0 Posts

    flash object on mouse over during slideshow (2002 SP3)

    I am in slideshow mode. I want a shape ("myshape") to change its fill and line color as the mouse passes over that object. So I named the shape, created a macro, went to Action settings/Mouse over/Run macro...

    this is the macro:

    Sub flash_myshape()
    '
    ActiveWindow.Selection.SlideRange.Shapes("myshape" ).Select

    If ActiveWindow.Selection.ShapeRange.Line.ForeColor.R GB = "0" Then

    With ActiveWindow.Selection.ShapeRange
    .Line.ForeColor.RGB = RGB(255, 0, 0)
    .Line.Visible = msoTrue
    .Fill.ForeColor.RGB = RGB(255, 255, 0)
    .Fill.Visible = msoTrue
    .Fill.Solid
    End With
    End
    End If


    If ActiveWindow.Selection.ShapeRange.Line.ForeColor.R GB = "255" Then

    With ActiveWindow.Selection.ShapeRange
    .Line.ForeColor.RGB = RGB(0, 0, 0)
    .Line.Visible = msoTrue
    .Fill.ForeColor.RGB = RGB(255, 255, 255)
    .Fill.Visible = msoTrue
    .Fill.Solid
    End With
    End If

    End Sub

    It works fine when I am in editing mode,...but I cant get this to happen during the slideshow. I think the problem is with the selection ... but this is beyond my knowledge now (very limited!). Help please. Thanks.
    Guillermo

  2. #2
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: flash object on mouse over during slideshow (2002 SP3)

    Try this:
    <pre>Sub flash_myshape()
    '
    With ActivePresentation.Slides(1).Shapes("myshape")
    If .Line.ForeColor.RGB = "255" Then
    .Line.ForeColor.RGB = RGB(0, 0, 0)
    .Line.Visible = msoTrue
    .Fill.ForeColor.RGB = RGB(255, 255, 255)
    .Fill.Visible = msoTrue
    .Fill.Solid
    Else
    .Line.ForeColor.RGB = RGB(255, 0, 0)
    .Line.Visible = msoTrue
    .Fill.ForeColor.RGB = RGB(255, 255, 0)
    .Fill.Visible = msoTrue
    .Fill.Solid
    End If
    End With
    End Sub</pre>



    You might want to tie the same macro to the mouse over and mouse click action settings. Otherwise you have to wave your mouse around to trigger it.
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •