Welcome to the { mindfrost82.com } forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > MS Office > PowerPoint

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-15-2008, 08:04 AM
=?Utf-8?B?RUJXaXJlZA==?=
 
Posts: n/a
Help with VBA

There's a great VBA from pptools.com that I've successfully used for a few
years now (below). Essentially, it'll help toggle text on and off with a
mouse click, and I usually use it for multiple buttons on a single slide
(e.g. for a game). But recently I can't toggle. The first click over the
button will show/hide text, but the second click takes me to the next slide.
And after playing around with keyboard stuff, the code will only work
properly for me if I press tab at the same time I do a left mouse click over
the action button (i.e. it will toggle text correctly rather than go to the
next slide). I never had to press tab before (nor do I want to during
presentations).

Can someone help me troubleshoot? I have PowerPoint 2007 running on Vista.
Thanks.


*****************************
Sub Peekaboo(oSh As Shape)
' Hides/makes visible the shape's text

With oSh.TextFrame.TextRange
' If it has text ...
If Len(.Text) > 0 Then
' Store the text in a tag so we can retrieve it later
oSh.Tags.Add "PeekabooText", .Text
' Now blank the text
.Text = ""
Else
.Text = oSh.Tags("PeekabooText")
End If
End With

End Sub

Sub ResetPeekaboos()
' Resets the shapes with peekaboo text to make the text invisible

Dim oSh As Shape
Dim oSl As Slide

For Each oSl In ActivePresentation.Slides
For Each oSh In oSl.Shapes
If Len(oSh.Tags("PeekabooText")) > 0 Then
oSh.TextFrame.TextRange.Text = ""
End If
Next ' oSh
Next ' oSl

End Sub

Sub UnhidePeekaboos()
' Resets the shapes with peekaboo text to make the text visible

Dim oSh As Shape
Dim oSl As Slide

For Each oSl In ActivePresentation.Slides
For Each oSh In oSl.Shapes
If Len(oSh.Tags("PeekabooText")) > 0 Then
oSh.TextFrame.TextRange.Text = oSh.Tags("PeekabooText")
End If
Next ' oSh
Next ' oSl

End Sub

Sub HidePeekaboos()
' Resets the shapes with peekaboo text to make the text invisible
' You must have activated the text as peekaboo one time for this to work

Dim oSh As Shape
Dim oSl As Slide

For Each oSl In ActivePresentation.Slides
For Each oSh In oSl.Shapes
If Len(oSh.Tags("PeekabooText")) > 0 Then
oSh.TextFrame.TextRange.Text = ""
End If
Next ' oSh
Next ' oSl

End Sub

Reply With Quote
  #2 (permalink)  
Old 09-15-2008, 08:06 PM
Steve Rindsberg
 
Posts: n/a
Re: Help with VBA


Great ... thanks for posting here as well as the email to me.

For starters, let's narrow down what might have caused this.
Did it start happening when you switched to PPT 2007 and/or Vista, or did it
work there for a time? If the latter, what else might have changed on the
system or in PowerPoint?

In article <7CAFC261-3522-4C7A-B812-2133E78299CC@microsoft.com>, EBWired wrote:
> There's a great VBA from pptools.com that I've successfully used for a few
> years now (below). Essentially, it'll help toggle text on and off with a
> mouse click, and I usually use it for multiple buttons on a single slide
> (e.g. for a game). But recently I can't toggle. The first click over the
> button will show/hide text, but the second click takes me to the next slide.
> And after playing around with keyboard stuff, the code will only work
> properly for me if I press tab at the same time I do a left mouse click over
> the action button (i.e. it will toggle text correctly rather than go to the
> next slide). I never had to press tab before (nor do I want to during
> presentations).
>
> Can someone help me troubleshoot? I have PowerPoint 2007 running on Vista.
> Thanks.
>
> *****************************
> Sub Peekaboo(oSh As Shape)
> ' Hides/makes visible the shape's text
>
> With oSh.TextFrame.TextRange
> ' If it has text ...
> If Len(.Text) > 0 Then
> ' Store the text in a tag so we can retrieve it later
> oSh.Tags.Add "PeekabooText", .Text
> ' Now blank the text
> .Text = ""
> Else
> .Text = oSh.Tags("PeekabooText")
> End If
> End With
>
> End Sub
>
> Sub ResetPeekaboos()
> ' Resets the shapes with peekaboo text to make the text invisible
>
> Dim oSh As Shape
> Dim oSl As Slide
>
> For Each oSl In ActivePresentation.Slides
> For Each oSh In oSl.Shapes
> If Len(oSh.Tags("PeekabooText")) > 0 Then
> oSh.TextFrame.TextRange.Text = ""
> End If
> Next ' oSh
> Next ' oSl
>
> End Sub
>
> Sub UnhidePeekaboos()
> ' Resets the shapes with peekaboo text to make the text visible
>
> Dim oSh As Shape
> Dim oSl As Slide
>
> For Each oSl In ActivePresentation.Slides
> For Each oSh In oSl.Shapes
> If Len(oSh.Tags("PeekabooText")) > 0 Then
> oSh.TextFrame.TextRange.Text = oSh.Tags("PeekabooText")
> End If
> Next ' oSh
> Next ' oSl
>
> End Sub
>
> Sub HidePeekaboos()
> ' Resets the shapes with peekaboo text to make the text invisible
> ' You must have activated the text as peekaboo one time for this to work
>
> Dim oSh As Shape
> Dim oSl As Slide
>
> For Each oSl In ActivePresentation.Slides
> For Each oSh In oSl.Shapes
> If Len(oSh.Tags("PeekabooText")) > 0 Then
> oSh.TextFrame.TextRange.Text = ""
> End If
> Next ' oSh
> Next ' oSl
>
> End Sub
>


-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Live and in personable in the Help Center at PowerPoint Live
Sept 21-24, San Diego CA, USA
www.pptlive.com

Reply With Quote
  #3 (permalink)  
Old 09-15-2008, 08:29 PM
=?Utf-8?B?RUJXaXJlZA==?=
 
Posts: n/a
Re: Help with VBA

Hi Steve,

Yes, everything was working with my system and I'm not sure what changed.
My macros are enabled, and when I do a dummy test on a new presentation, the
same glitch occurs. I have a feeling it's probably with my settings, but I
just don't know why or where to start. Does that tab+left mouse click give
you a clue?

On two sidenotes, I didn't realize I would reach the same person with this
problem, so that's great. Second, I see that you'll be in San Diego where I
live, but it's too bad that I'll be out of town this weekend. Maybe I can
check out what pptlive is all about next Tue or Wed!



"Steve Rindsberg" wrote:

>
> Great ... thanks for posting here as well as the email to me.
>
> For starters, let's narrow down what might have caused this.
> Did it start happening when you switched to PPT 2007 and/or Vista, or did it
> work there for a time? If the latter, what else might have changed on the
> system or in PowerPoint?
>



Reply With Quote
  #4 (permalink)  
Old 09-16-2008, 01:09 AM
Steve Rindsberg
 
Posts: n/a
Re: Help with VBA

Tellyawhat ... create a small pressie that does this and email it to me at steve
atsign pptools dot com

But first, check the slide setup and make sure it's set to kiosk mode.

PPTLive registration starts Sunday; the event itself starts Monday and runs
through Weds. Since you wouldn't need a hotel room, it might well be worth
looking into. Lots of good presenters there, lots of good info to be shared.

And once you're past the bouncer at the door (big rabbit-looking fella named
Harvey) look me up in the help center. <g>


In article <6E72E903-FCC3-47F9-A45F-F12D01DDFE7B@microsoft.com>, EBWired wrote:
> Hi Steve,
>
> Yes, everything was working with my system and I'm not sure what changed.
> My macros are enabled, and when I do a dummy test on a new presentation, the
> same glitch occurs. I have a feeling it's probably with my settings, but I
> just don't know why or where to start. Does that tab+left mouse click give
> you a clue?
>
> On two sidenotes, I didn't realize I would reach the same person with this
> problem, so that's great. Second, I see that you'll be in San Diego where I
> live, but it's too bad that I'll be out of town this weekend. Maybe I can
> check out what pptlive is all about next Tue or Wed!
>
> "Steve Rindsberg" wrote:
>
> >
> > Great ... thanks for posting here as well as the email to me.
> >
> > For starters, let's narrow down what might have caused this.
> > Did it start happening when you switched to PPT 2007 and/or Vista, or did it
> > work there for a time? If the latter, what else might have changed on the
> > system or in PowerPoint?
> >

>


-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Live and in personable in the Help Center at PowerPoint Live
Sept 21-24, San Diego CA, USA
www.pptlive.com

Reply With Quote
  #5 (permalink)  
Old 09-16-2008, 04:30 PM
=?Utf-8?B?Sm9obiBXaWxzb24=?=
 
Posts: n/a
Re: Help with VBA

This sounds like a long shot but the ALT key enables ENTER to activate the
action button. Could you have set your mouse click up to emulate ENTER?
--
Amazing PPT Hints, Tips and Tutorials

http://www.pptalchemy.co.uk/powerpoi...tutorials.html
_______________________________

We''re at PPTLive - see you there?
www.pptlive.com


"EBWired" wrote:

> Hi Steve,
>
> Yes, everything was working with my system and I'm not sure what changed.
> My macros are enabled, and when I do a dummy test on a new presentation, the
> same glitch occurs. I have a feeling it's probably with my settings, but I
> just don't know why or where to start. Does that tab+left mouse click give
> you a clue?
>
> On two sidenotes, I didn't realize I would reach the same person with this
> problem, so that's great. Second, I see that you'll be in San Diego where I
> live, but it's too bad that I'll be out of town this weekend. Maybe I can
> check out what pptlive is all about next Tue or Wed!
>
>
>
> "Steve Rindsberg" wrote:
>
> >
> > Great ... thanks for posting here as well as the email to me.
> >
> > For starters, let's narrow down what might have caused this.
> > Did it start happening when you switched to PPT 2007 and/or Vista, or did it
> > work there for a time? If the latter, what else might have changed on the
> > system or in PowerPoint?
> >

>
>

Reply With Quote
  #6 (permalink)  
Old 10-11-2008, 11:29 PM
=?Utf-8?B?RUJXaXJlZA==?=
 
Posts: n/a
Re: Help with VBA

Hi John,

Thanks for explaining what the tab key does (it's not the Alt from what I
see). I experimented and yes, if I tab to each action button and press
Enter, then the toggle VBA works. I'll also look into the mouse settings
some more since I had a hard time figuring it out right away.

I wonder if MS changed something through its updates so that the VBA doesn't
work with the mouse anymore? It's frustratingly weird.

And I would've responded earlier. I didn't know you replied to my post.
Thanks again!




"John Wilson" wrote:

> This sounds like a long shot but the ALT key enables ENTER to activate the
> action button. Could you have set your mouse click up to emulate ENTER?
> --
> Amazing PPT Hints, Tips and Tutorials
>
> http://www.pptalchemy.co.uk/powerpoi...tutorials.html
> _______________________________
>
> We''re at PPTLive - see you there?
> www.pptlive.com
>
>
> "EBWired" wrote:
>
> > Hi Steve,
> >
> > Yes, everything was working with my system and I'm not sure what changed.
> > My macros are enabled, and when I do a dummy test on a new presentation, the
> > same glitch occurs. I have a feeling it's probably with my settings, but I
> > just don't know why or where to start. Does that tab+left mouse click give
> > you a clue?
> >
> > On two sidenotes, I didn't realize I would reach the same person with this
> > problem, so that's great. Second, I see that you'll be in San Diego where I
> > live, but it's too bad that I'll be out of town this weekend. Maybe I can
> > check out what pptlive is all about next Tue or Wed!
> >
> >
> >
> > "Steve Rindsberg" wrote:
> >
> > >
> > > Great ... thanks for posting here as well as the email to me.
> > >
> > > For starters, let's narrow down what might have caused this.
> > > Did it start happening when you switched to PPT 2007 and/or Vista, or did it
> > > work there for a time? If the latter, what else might have changed on the
> > > system or in PowerPoint?
> > >

> >
> >

Reply With Quote
  #7 (permalink)  
Old 10-12-2008, 06:08 PM
Steve Rindsberg
 
Posts: n/a
Re: Help with VBA

Can we name the new bug after you, Eugene? ;-)

Seems to be an oddity in PPT 2007; after triggering one action setting that
fires a macro, PPT2007 acts as though all the "animation" on the slide is done
... you'll notice that none of the shapes with action settings are active any
longer after firing the macro once ... no pointing hand pointer, etc.

Once I noticed that, I figured that "reloading" the slide, same as we have to do
to get animations to replay, might work. And begorrah. It does. One line of
code fixes it, see below:

Sub Peekaboo(oSh As Shape)
' Hides/makes visible the shape's text

With oSh.TextFrame.TextRange
' If it has text ...
If Len(.Text) > 0 Then
' Store the text in a tag so we can retrieve it later
oSh.Tags.Add "PeekabooText", .Text
' Now blank the text
.Text = ""
Else
.Text = oSh.Tags("PeekabooText")
End If
End With

' ADD THIS LINE
SlideShowWindows(1).View.GotoSlide (oSh.Parent.SlideIndex)


End Sub


In article <7CAFC261-3522-4C7A-B812-2133E78299CC@microsoft.com>, EBWired wrote:
> There's a great VBA from pptools.com that I've successfully used for a few
> years now (below). Essentially, it'll help toggle text on and off with a
> mouse click, and I usually use it for multiple buttons on a single slide
> (e.g. for a game). But recently I can't toggle. The first click over the
> button will show/hide text, but the second click takes me to the next slide.
> And after playing around with keyboard stuff, the code will only work
> properly for me if I press tab at the same time I do a left mouse click over
> the action button (i.e. it will toggle text correctly rather than go to the
> next slide). I never had to press tab before (nor do I want to during
> presentations).
>
> Can someone help me troubleshoot? I have PowerPoint 2007 running on Vista.
> Thanks.
>
> *****************************
> Sub Peekaboo(oSh As Shape)
> ' Hides/makes visible the shape's text
>
> With oSh.TextFrame.TextRange
> ' If it has text ...
> If Len(.Text) > 0 Then
> ' Store the text in a tag so we can retrieve it later
> oSh.Tags.Add "PeekabooText", .Text
> ' Now blank the text
> .Text = ""
> Else
> .Text = oSh.Tags("PeekabooText")
> End If
> End With
>
> End Sub
>
> Sub ResetPeekaboos()
> ' Resets the shapes with peekaboo text to make the text invisible
>
> Dim oSh As Shape
> Dim oSl As Slide
>
> For Each oSl In ActivePresentation.Slides
> For Each oSh In oSl.Shapes
> If Len(oSh.Tags("PeekabooText")) > 0 Then
> oSh.TextFrame.TextRange.Text = ""
> End If
> Next ' oSh
> Next ' oSl
>
> End Sub
>
> Sub UnhidePeekaboos()
> ' Resets the shapes with peekaboo text to make the text visible
>
> Dim oSh As Shape
> Dim oSl As Slide
>
> For Each oSl In ActivePresentation.Slides
> For Each oSh In oSl.Shapes
> If Len(oSh.Tags("PeekabooText")) > 0 Then
> oSh.TextFrame.TextRange.Text = oSh.Tags("PeekabooText")
> End If
> Next ' oSh
> Next ' oSl
>
> End Sub
>
> Sub HidePeekaboos()
> ' Resets the shapes with peekaboo text to make the text invisible
> ' You must have activated the text as peekaboo one time for this to work
>
> Dim oSh As Shape
> Dim oSl As Slide
>
> For Each oSl In ActivePresentation.Slides
> For Each oSh In oSl.Shapes
> If Len(oSh.Tags("PeekabooText")) > 0 Then
> oSh.TextFrame.TextRange.Text = ""
> End If
> Next ' oSh
> Next ' oSl
>
> End Sub
>


-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================


Reply With Quote
  #8 (permalink)  
Old 10-12-2008, 11:35 PM
=?Utf-8?B?RUJXaXJlZA==?=
 
Posts: n/a
Re: Help with VBA

At first try, the code worked. And so the universe is back to normal again.
Let's just hope that once I fix the old PPT files that they'll be fine.

Steve, you and John rock, and so thank you very much for help with this.

"Steve Rindsberg" wrote:

> Can we name the new bug after you, Eugene? ;-)
>
> Seems to be an oddity in PPT 2007; after triggering one action setting that
> fires a macro, PPT2007 acts as though all the "animation" on the slide is done
> ... you'll notice that none of the shapes with action settings are active any
> longer after firing the macro once ... no pointing hand pointer, etc.
>
> Once I noticed that, I figured that "reloading" the slide, same as we have to do
> to get animations to replay, might work. And begorrah. It does. One line of
> code fixes it, see below:
>
> Sub Peekaboo(oSh As Shape)
> ' Hides/makes visible the shape's text
>
> With oSh.TextFrame.TextRange
> ' If it has text ...
> If Len(.Text) > 0 Then
> ' Store the text in a tag so we can retrieve it later
> oSh.Tags.Add "PeekabooText", .Text
> ' Now blank the text
> .Text = ""
> Else
> .Text = oSh.Tags("PeekabooText")
> End If
> End With
>
> ' ADD THIS LINE
> SlideShowWindows(1).View.GotoSlide (oSh.Parent.SlideIndex)
>
>
> End Sub
>
>
> In article <7CAFC261-3522-4C7A-B812-2133E78299CC@microsoft.com>, EBWired wrote:
> > There's a great VBA from pptools.com that I've successfully used for a few
> > years now (below). Essentially, it'll help toggle text on and off with a
> > mouse click, and I usually use it for multiple buttons on a single slide
> > (e.g. for a game). But recently I can't toggle. The first click over the
> > button will show/hide text, but the second click takes me to the next slide.
> > And after playing around with keyboard stuff, the code will only work
> > properly for me if I press tab at the same time I do a left mouse click over
> > the action button (i.e. it will toggle text correctly rather than go to the
> > next slide). I never had to press tab before (nor do I want to during
> > presentations).
> >
> > Can someone help me troubleshoot? I have PowerPoint 2007 running on Vista.
> > Thanks.
> >
> > *****************************
> > Sub Peekaboo(oSh As Shape)
> > ' Hides/makes visible the shape's text
> >
> > With oSh.TextFrame.TextRange
> > ' If it has text ...
> > If Len(.Text) > 0 Then
> > ' Store the text in a tag so we can retrieve it later
> > oSh.Tags.Add "PeekabooText", .Text
> > ' Now blank the text
> > .Text = ""
> > Else
> > .Text = oSh.Tags("PeekabooText")
> > End If
> > End With
> >
> > End Sub
> >
> > Sub ResetPeekaboos()
> > ' Resets the shapes with peekaboo text to make the text invisible
> >
> > Dim oSh As Shape
> > Dim oSl As Slide
> >
> > For Each oSl In ActivePresentation.Slides
> > For Each oSh In oSl.Shapes
> > If Len(oSh.Tags("PeekabooText")) > 0 Then
> > oSh.TextFrame.TextRange.Text = ""
> > End If
> > Next ' oSh
> > Next ' oSl
> >
> > End Sub
> >
> > Sub UnhidePeekaboos()
> > ' Resets the shapes with peekaboo text to make the text visible
> >
> > Dim oSh As Shape
> > Dim oSl As Slide
> >
> > For Each oSl In ActivePresentation.Slides
> > For Each oSh In oSl.Shapes
> > If Len(oSh.Tags("PeekabooText")) > 0 Then
> > oSh.TextFrame.TextRange.Text = oSh.Tags("PeekabooText")
> > End If
> > Next ' oSh
> > Next ' oSl
> >
> > End Sub
> >
> > Sub HidePeekaboos()
> > ' Resets the shapes with peekaboo text to make the text invisible
> > ' You must have activated the text as peekaboo one time for this to work
> >
> > Dim oSh As Shape
> > Dim oSl As Slide
> >
> > For Each oSl In ActivePresentation.Slides
> > For Each oSh In oSl.Shapes
> > If Len(oSh.Tags("PeekabooText")) > 0 Then
> > oSh.TextFrame.TextRange.Text = ""
> > End If
> > Next ' oSh
> > Next ' oSl
> >
> > End Sub
> >

>
> -----------------------------------------
> Steve Rindsberg, PPT MVP
> PPT FAQ: www.pptfaq.com
> PPTools: www.pptools.com
> ================================================
>
>
>

Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > MS Office > PowerPoint


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:55 PM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0


Sponsors:
Fast Loans | Birthday Gifts | El libro de los nombre | Free Advertising | Debt Consolidation



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114