Consulting

Results 1 to 3 of 3

Thread: Text box alter while viewing show

  1. #1
    VBAX Newbie
    Joined
    May 2011
    Posts
    2
    Location

    Question Text box alter while viewing show

    Hi,
    I am quite annoyed at the at the fact that when I write a macro to change text, then add a action button to do that macro, in the middle of showing a presentaion, that it doesn't work. Please can you get my text to change whilst showing slideshow.

    .
    Please help!
    p.s. i am using powerpoint 2003
    p.p.s. my code is (whole module coming but the bit I'm annoyed about is in red):

    Option Explicit
    Public x As Integer
    Sub Shape1_MovementLeft()
    With ActivePresentation.Slides(1).Shapes(1)
    .Left = .Left - x
    End With
    End Sub

    Sub Shape1_MovementUp()
    With ActivePresentation.Slides(1).Shapes(1)
    .Horizontal = . 10
    End With
    End Sub

    Sub Shape1_MovementRight()
    With ActivePresentation.Slides(1).Shapes(1)
    .Left = .Left + x
    End With
    End Sub

    Sub Shape1_MovementDown()
    With ActivePresentation.Slides(1).Shapes(1)
    .Down = .Down - 10
    End With
    End Sub

    Sub ChangeX_UP()
    x = x + 1
    ActiveWindow.Selection.SlideRange.Shapes("Text Box 14").TextFrame.TextRange.Text = ("Movement = " & x)
    DoEvents

    End Sub

    Sub ChangeX_Down()
    x = x - 1
    ActiveWindow.Selection.SlideRange.Shapes("Text Box 14").TextFrame.TextRange.Text = ("Movement = " & x)
    DoEvents

    End Sub

    Sub ResetX()
    x = 20
    ]ActiveWindow.Selection.SlideRange.Shapes("Text Box 14").TextFrame.TextRange.Text = ("Movement = " & x)
    DoEvents

    End Sub
    Last edited by 10redmoe; 05-30-2011 at 10:03 AM.

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    Not sure why you are annoyed. Any code that depends on Selection will ALWAYS fail in show mode because it's impossible to select anything in that mode. Try SlideShowWindows(1).View.Slide.Shapes("TextBox 14").TextFrame.TextRange=

    Also .Horizontal and .Down are valid commands??? (I don't think they are)

    Maybe if you explain exactly what you need to happen we can fix the rest.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    VBAX Newbie
    Joined
    May 2011
    Posts
    2
    Location
    It worked! Cheers! I am a newbie so am a bit stupid with VBA.
    down to all you VBA geeks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •