(Msg. 2) Posted: Wed Jul 02, 2008 12:13 am
Post subject: RE: VBA Textbox Add to elertz [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
With vba code you could. You might also like to know that if you type eg 12
ENTER on the keyboard during a show you will go to slide 12.
--
-------------------------------------------
Amazing PPT Hints, Tips and Tutorials
> I there any way, say, to type in a textbox "Slide 5" and go to slide 5, and
> to to type in the same textbox "Slide 6" and go to slide 6?
>
>
> Thanks
>
> Alexf
(Msg. 3) Posted: Wed Jul 02, 2008 6:42 am
Post subject: Re: VBA Textbox Add to elertz [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
It's not clear to me what you are trying to do. It sounds like you want
to have the same information in a textbox on slides 5 and 6 so if you
type in either of the slides it shows up in both the slides. So, now for
my questions:
Do you want this to happen in Slide Show view or Normal/Edit view?
Do you want to use a regular textbox or a control text box?
=?Utf-8?B?QWxleGY=?= <Alexf.TakeThisOut@discussions.microsoft.com> wrote in
news:6F29BBFE-B263-4BF3-8B13-4C42DBDA23C7@microsoft.com:
> I there any way, say, to type in a textbox "Slide 5" and go to slide
> 5, and to to type in the same textbox "Slide 6" and go to slide 6?
>
>
> Thanks
>
> Alexf
(Msg. 4) Posted: Wed Jul 02, 2008 3:48 pm
Post subject: Re: VBA Textbox Add to elertz [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
"David M. Marcovitz" wrote:
> It's not clear to me what you are trying to do. It sounds like you want
> to have the same information in a textbox on slides 5 and 6 so if you
> type in either of the slides it shows up in both the slides. So, now for
> my questions:
>
> Do you want this to happen in Slide Show view or Normal/Edit view?
>
> Do you want to use a regular textbox or a control text box?
>
> Do you care if the solution involves VBA?
>
> --David
>
> --
> David M. Marcovitz
> Microsoft PowerPoint MVP
> Author of _Powerful PowerPoint for Educators_
> http://www.PowerfulPowerPoint.com/ >
> =?Utf-8?B?QWxleGY=?= <Alexf RemoveThis @discussions.microsoft.com> wrote in
> news:6F29BBFE-B263-4BF3-8B13-4C42DBDA23C7@microsoft.com:
>
> > I there any way, say, to type in a textbox "Slide 5" and go to slide
> > 5, and to to type in the same textbox "Slide 6" and go to slide 6?
> >
> >
> > Thanks
> >
> > Alexf
Do you want this to happen in Slide Show view or Normal/Edit view? In
SLideshow View
Do you want to use a regular textbox or a control text box? Control Textbox
Do you care if the solution involves VBA? Yes, it should in order for you
to type in "Slide 600" in kiosk mode and go to slide 600, etc
(Msg. 6) Posted: Thu Jul 03, 2008 11:01 am
Post subject: Re: VBA Textbox Add to elertz [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
In article <0B7FD83A-84EA-4CB9-A14D-CF11EE3B0AC6 DeleteThis @microsoft.com>, Alexf wrote:
> Also:
>
> I'm not sure what the code would be, so I was wondering if someone would
> help me...
Here's one approach ... not necessarily the best, but it's a start
Using the controls toolbox, add a text box to the slide.
Doubleclick the new text box to get into the VBA editor. VBA will have
automatically added this:
Private Sub TextBox1_Change()
End Sub
Change it to look like this (ie, paste the add'l code in the middle):
Private Sub TextBox1_Change()
Dim lSlideNumber As Long
' since the change event fires with EVERY change to the text box,
' look for a signal from the user that no more entries are to come
' in this case, an = sign
If Right$(Me.TextBox1.Text, 1) = "=" Then
' strip out the = sign, convert the rest to a number
lSlideNumber = CLng(Left$(Me.TextBox1.Text, Len(Me.TextBox1.Text) - 1))
Debug.Print lSlideNumber
' make sure we don't try to jump past the end of the slide show
If Not lSlideNumber > ActivePresentation.Slides.Count Then
' and if the number's ok, go there
ActivePresentation.SlideShowWindow.View.GotoSlide (lSlideNumber)
End If
' and clear the decks for the next round
Me.TextBox1.Text = ""
End If
End Sub
Now when you type a number into the text box during a slide show then press the
= key, it'll jump to that slide.
Using the change event, we can't have it jump automatically w/o some kind of
special "trigger" like the = key ... otherwise it'd jump as soon as you typed
the first number. You'd never get to slide 11. <g>
There are other events you can play with; I thought the LostFocus one would be
a good candidate but it never seems to fire. Sigh.
(Msg. 7) Posted: Thu Jul 03, 2008 5:27 pm
Post subject: Re: VBA Textbox Add to elertz [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Thank you; that worked fine!
another Question:
If i was to make another VBA textbox, and make it so that I type [Insert
Characters Here, e.g. marketing] and make it go to slide 16, which happens to
be marketing, is there an way I can do it with VBA?
(Msg. 8) Posted: Fri Jul 04, 2008 11:57 am
Post subject: Re: VBA Textbox Add to elertz [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
In article <F2E4FA02-429E-4403-BD58-EE66F36A5DF7.RemoveThis@microsoft.com>, Alexf wrote:
> Thank you; that worked fine!
>
> another Question:
>
> If i was to make another VBA textbox, and make it so that I type [Insert
> Characters Here, e.g. marketing] and make it go to slide 16, which happens to
> be marketing, is there an way I can do it with VBA?
Same general idea but:
If Right$(Me.TextBox1.Text, 1) = "=" Then
' strip out the = sign
Select Case Ucase(Left$(Me.TextBox1.Text, Len(Me.TextBox1.Text) - 1)
Case Is = "MARKETING"
ActivePresentation.SlideShowWindow.View.GotoSlide (16)
Case Is = "LEGAL"
ActivePresentation.SlideShowWindow.View.GotoSlide (42)
Case Else
MsgBox "Sorry, no such department, try again."
End Select
' and clear the decks for the next round
Me.TextBox1.Text = ""
End If
And I hope someone will chime in with a better way to detect that the user's
done entering text/numbers than forcing them to type a special character, but
the Change event swallows/ignores the usual "I'm done" keystrokes like Enter and
Tab.
It'd be more obvious for the user if you add a command button next to the text
box, labeled "Go" or the like. Put the code in the command button's Click
event.
All times are: Eastern Time (US & Canada) (change) Goto page 1, 2
Page 1 of 2
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum