PDA

View Full Version : Macro for moving to the desired slide



sarmani
02-20-2011, 08:15 AM
Hi

Please help me out by designing a macro (with coding) to move to the desired slide in a powerpoint presentation (Normal view).

For eg. If i am workng on a 80 slide powerpoint file in MS powerpoint 2007 and want to move to slide 10.

Thanks and regards
Saavanan Mani

John Wilson
02-20-2011, 08:43 AM
This should get you going:
Sub Take_me()
Dim strSlide As String
Dim IntSlide As Integer
Do
strSlide = InputBox("Where to?")
Loop Until IsNumeric(strSlide)
IntSlide = Val(strSlide)
If IntSlide < 1 Or IntSlide > ActivePresentation.Slides.Count Then
MsgBox "Out of range"
Exit Sub
End If
ActivePresentation.Slides(IntSlide).Select
End Sub

sarmani
02-20-2011, 08:53 AM
Hi Wilson

Thanks for giving a very quick coding reply for my request.

Is it? possible to have the "Input box - where to go" something like - always floating object when the powerpoint is opened. It would be helpful when we want to go to the desired slide when we require.

The help on the same would be really useful for my day to day work as i deal with lot of powerpoint jobs.

Thanks and regards
Saravanan Mani

John Wilson
02-20-2011, 09:06 AM
It is but you would need to add a non modal userform.
We have a free addIn which does what you need. You can get the installer here. (http://www.pptalchemy.co.uk/TakeMe.msi)
There are no instructions but it's very easy to use. You will either get a new toolbar (2002/2003) or a menu in the Add In tab in 2007 onwards. Note it will not load automatically if you have 2010 64 bit and you will need to manually load it.

John Wilson
02-20-2011, 09:44 AM
Just tried., maybe it doesn't do what you ask!