Consulting

Results 1 to 2 of 2

Thread: Make text appear when hovering/clicking on other title

  1. #1

    Make text appear when hovering/clicking on other title

    Hi everybody!

    I have ZERO experience with VBA, and frankly, I spent quite some time trying to learn, and as I don't intend to use this very often, it starts to become too time-consuming, so if I can't find any help here, I'll go for something way more uncomplicated.

    So here it is. I'm creating a Powerpoint to use as an interactive cheat sheet, and in one slide, I would like to be able to hover or click on something (like a title) to make some text appear. I found that code that seems to do it:


    Sub change_texte(forme As Shape)
    With SlideShowWindows(1).View.Slide.Shapes("cercle_texte").TextFrame.TextRange
    Select Case forme.Name
    Case"Rectangle_vide"
            .Text =""
    Case"Rectangle 1"
            .Text ="Information 1"
    Case"Rectangle 2"
            .Text ="Information 2"
    Case"Rectangle 3"
            .Text ="Information 3"
    Case"Rectangle 4"
            .Text ="Information 4"
    End Select
    End With
    End Sub
    
    BUT, and that's where I could use some help...

    - I don't know how to refer to the specific slide (and name it) where I want the action to occur.
    - The text that I want to appear will be from another slide, instead of directly in the code (I want my customers to be able to print the slides, so the text need to be somewhere visible)

    - I don't know if it's helpful information, but I would like to use the same slides throughout different presentations


    It's challenging for me; maybe it's a piece of cake for one of you?


    I would be grateful if anybody could give me the code to do what I want. I'll be OK to make changes once I have the foundations.


    I can give access to the presentation to the interested!


    THANK YOU VERY MUCH!

    Antoine
    Last edited by Aussiebear; 12-01-2021 at 04:40 AM. Reason: Added code tags to supplied code

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,340
    Location
    Well, this is not very elegant, but it might be an option for you:

    Insert a Mouse Over or Mouse Click Animation that calls a sub like the one below. The Hovered Over shape is passed to the sub

    Capture.JPG

    Option Explicit
    
    
    Sub HoverMouse(shp As Shape)
    
    
        MsgBox "Over " & shp.Name
    
    
    End Sub
    Attached Files Attached Files
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

Posting Permissions

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