Hello everyone,
First time being on this forum. I am an avid user of VBA especially with Excel and Visio. I don't know if this has been asked yet but i need help in grabbing the name or id of a user selected shape, in an active powerpoint slide. I want to display a message in case a user clicks a particular shape, with names "Increase" or "Reduce". I set up my code in a SELECT CASE format and i am trying to capture the selected shape as a variant and assign it to my shape object, however i don't get any results. Here is my code. Please and thank you
Sub determineShapeType() Dim osld As Slide Dim slideNum As Integer Dim Userselection As Variant Dim oshp As Shape osld = ActivePresentation.SlideShowWindow.View.Slide Set Userselection = ActiveWindow.Selection.Shaperange Set oshp = osld.Shapes(Userselection.Name) Select Case oshp.Name Case "Increase" MsgBox " You have increased your speed" ' Something else Case "Reduce" MsgBox "You have decreased your speed" ' Something else End Select End Sub





Reply With Quote