PDA

View Full Version : How do I "click" a Command Button in PowerPoint edit mode?



RussellP904
04-12-2023, 08:15 AM
Simple, but dumb question. I have a PowerPoint presentation that requires a lot of edits depending on service level. I created a Form window, and have all of the code in place to make the edits quickly but I am stumped on how to show the form to the creator-

I put a CommandButton on the 1st page of the presentation, and it has the following OnClick code but when it's clicked, it only selects the button (edit mode). How can I make it to where the user can click the button while PowerPoint is in edit mode, or another way to show the form?


Private Sub CommandButton1_Click()
Setup.Show
CommandButton1.Select
Selection.Delete
End Sub



30722

Aussiebear
04-12-2023, 03:10 PM
Welcome to the VBAX forum RussellP904. Did by any chance you post this question elsewhere?

John Wilson
04-14-2023, 05:38 AM
If you crosspost please mention this - it avoids people working on problems solved elsewhere!

There is no simple way to make buttons clickable in Edit Mode. If you know how to create a class module with an event trap then you can but i guess you don't know how to do that.

One possibility is to create a Ribbon tab / Button with XML. This will run a vba macro to open your form. There is a learning curve but not as steep as writing class modules!

Test out the attached file to see how it works. NOTE Macros may be disabled - save as and reload the file making sure macros are enabled.

30723

Paul_Hossler
04-15-2023, 08:38 AM
If you just want the setup macro to run when the pptm is opend, I think that the onLoad CustomUI will work