Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-12-2013, 07:28 AM
chcope chcope is offline Command buttons on slidemaster Windows 7 64bit Command buttons on slidemaster Office 2013
Novice
Command buttons on slidemaster
 
Join Date: Jun 2013
Posts: 2
chcope is on a distinguished road
Default Command buttons on slidemaster

I have a pptm that someone else created, that I'd like to modify. They put 3 command buttons on the slidemaster that, when clicked, move the current slide into the section number corresponding to the text number on the button. So, if the button marked 3 is clicked, the slide is moved to the 3rd section in the presentation.

I'm trying to duplicate these buttons to allow more choices of sections. I'd like to have 10 sections, so I need 10 buttons. Each would have the same code behind it as the existing ones do, but (it seems to me) just edited with appropriate numbers.



The existing buttons work great. I see that there is a public sub corresponding to each button, and I see the private sub (that each button's sub calls) below those 3 public subs that does the moving of the slides to the desired sections.

The problem is that I can't seem to find how the buttons on the slidemaster call their corresponding subs, so I can't see how to create buttons that do what the existing ones do. I've looked everywhere I can think of.

Thanks!
Reply With Quote
  #2  
Old 06-13-2013, 05:39 AM
JohnWilson JohnWilson is offline Command buttons on slidemaster Windows 7 64bit Command buttons on slidemaster Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

You don't need Command Buttons at all.

Add ten shapes to the master and add text 1,2,3,... 10 etc (nothing else) so that each button has the number of the section

Now add a normal code module and add these few lines of code

Sub sectionFind(oshp As Shape)
Dim osld As Slide
Dim lngSec As Long
lngSec = Val(oshp.TextFrame.TextRange)
For Each osld In ActivePresentation.Slides
If osld.sectionIndex = lngSec Then
SlideShowWindows(1).View.GotoSlide osld.SlideIndex
Exit Sub
End If
Next
End Sub

Give each of the ten shapes the same action of run this macro.

See if that works and is maybe simpler?
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #3  
Old 06-13-2013, 04:30 PM
chcope chcope is offline Command buttons on slidemaster Windows 7 64bit Command buttons on slidemaster Office 2013
Novice
Command buttons on slidemaster
 
Join Date: Jun 2013
Posts: 2
chcope is on a distinguished road
Default

That's great! Thanks very much!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
activex command buttons and text boxes TRG Word 0 02-03-2012 09:18 AM
Check Boxes and Command Buttons Micky P Word VBA 0 10-27-2011 01:06 AM
Command Buttons lorenambrose Word 0 10-06-2011 11:55 AM
command buttons ronf Excel 0 04-28-2006 08:32 AM
command buttons ronf Excel 0 12-03-2005 06:26 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:49 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft