PPT VBA - Clicking on non-existent textbox?

G

Glen Millar

A virtual mornin' to you Glen, I'm doin' the night shift in our house and am
about to clock off.

Beware the snaps, crackles and pops, they're part of the conspiracy.

Ah. So you hear those *noises* as well!
 
Z

Zigzag

Evening Glen,
Ah. So you hear those *noises* as well!

Man, I feel them. Their malevolence is all pervasive as they gather their
forces in the bowl. (Shudder).

The rumour mill is on full grind.

Zig
 
Z

Zigzag

Hi All,

Win XP Pro
Office 2003

This thread seems to have gone off-topic slightly, again, so I need to drag
it back unfortunately.

I've been doing my bit of vba coding using the (useful) information gleaned
so far but I've hit a problem and as anybody who has read thru this thread
will know I'm rubbish at vba.

My presentation begins with a series of animated effects before settling
down waiting for a user to click on an image. When the user clicks on an
image some more custom animation runs and also a vba sub that creates a text
box (leading on to other things).

Using the following line creates the text box ok but also restarts the slide
animation from the very beginning.
How can I stop the animation from restarting?

Set textBox13 =
ActivePresentation.Slides(1).Shapes.AddTextbox(msoTextOrientationHorizontal,
609.5, 496.75, 107.75, 28.875)

Thanks

Zig
 
D

David M. Marcovitz

Not sure of that but what if the text box were created already, but
invisible or off the slide, and your code just makes it visible and
puts it where it needs to appear?

I think that is where we started. For some reason, when he makes
textboxes invisible, he is having a hard time clicking on the text boxes
that are underneath the invisible ones. I wonder if the animations are
affecting this since he has a bunch of shapes animated on the slide.

--David

--
David M. Marcovitz
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
Z

Zigzag

Hi David,

That's about the gist of it from the experiences I'm having but that would
suggest running custom animation and vba from the same trigger is not
possible under these circumstances.
I find that strange, leaving me with 4 options:
i) scrap the idea of doing a 1 slide presentation (which is sad because I
think it works well visually)
ii) don't allow an additional text screen (which doesn't meet requirements)
iii) write everything in vba (which is beyond my capabilities and time limit
at the moment )
iv) place the text boxes in different places on the slide (which looks
unprofessional and will become unwieldy if the number of required boxes
increases)

Sigh!

Zig
 
D

David M. Marcovitz

1. It is possible to make a slideshow with several slides that the viewer
can't distinguish from one with a single slide. You can start with Insert
Duplicate slide. The visual appeal might be identical, and you might be
able to get it to work.
2. You should be able to get it to work. I'm not sure why it is not
working for you.
3. Ah c'mon, try it, it's not that hard:)
4. I'm just speculating about the animation stuff causing problems
because I don't have the same problem you have, but I haven't had time to
follow your earlier instructions to create the exact problem. Have you
tried using VBA to move the text boxes off-screen instead of hiding them
(I think both Steve and I suggested it in separate notes). A box that is
not actually covering a shape (not just invisible) surely can't prevent
clicking.

--David

--
David M. Marcovitz
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
Z

Zigzag

Hi David,

Thank you for the response.

Just in case I've got some kind of corruption I'm going to start again from
scratch. I've attempted a lot of fixes and at one point I actually saw 2
different shapes with the same shape number in the custom animation tile. I
didn't save the presentation so assumed all changes would be lost.
Have you
tried using VBA to move the text boxes off-screen instead of hiding them

I tried motion paths to put the textboxes in place when needed and move them
out again when not. This gave the result that although the boxes moved, the
clickable areas remained at the starting positions of the paths and not the
end positions where I needed them.

Although I am currently using:
ActivePresentation.Slides(1).Shapes.AddTextbox(msoTextOrientationHorizontal,
609.5, 496.75, 107.75, 28.875) (which I got from your example 7.9 by the
way)
I started off using
ActiveWindow.Selection.SlideRange.Shapes.AddTextbox(msoTextOrientationHorizontal,
609.5, 496.75, 107.75, 28.875) which worked fine when run from VB editor but
wouldn't work at all from within the slideshow. I assumed that it was some
kind of context thing. VB help was gobbledygook on the subject.
Ah c'mon, try it, it's not that hard:)

I've spent literally man-days trying to figure out how to do animation in
vba using the vb help without success. It wasn't until I went to Steve's
site and MSDN that I could even begin to comprehend. The vba help is a
reference tool, extensive, but that's as far as it goes in usefulness. As I
said in a previous post I am quite prepared to accept that it's me who has a
mental block as I've tried and failed a number of times to get into vba. And
before I give the impression of feeling sorry for myself, I've got to say
I'm completely confident with hacking code, just not oo.
Does that answer your question ;-)
You should be able to get it to work. I'm not sure why it is not
working for you.

Me neither, so I'm calling it a day if it still doesn't work after
rebuilding from scratch.

I do, however, thank everyone for their time, patience and advice.

Regards

Zig
 
Z

Zigzag

Hi Steve,

Thank you for the clarification, now about the other 1,700,546...

I've noticed a number of recommendations on the net to use the Record Macro
function to clarify certain vba uses and that is where the ActiveWindow code
came from.

I started to wonder why there was a Selection property on ActiveWindow when
you can't select anything in the show and then realised it's not to be used
in that context, right? Rhetorical: I wonder how many other objects, methods
& properties fall into this category?

Regards

Zig
 
D

David M. Marcovitz

Yes, record macro is good once you understand how to change the macro to
work in Slide Show view. I think your starting to get that now. This
feature sometimes trips up even experienced VBA programmers because there
is no such thing as Slide Show view in the other Office apps.

By the way, just so you don't feel so alone and embarassed...Last night
my multimedia design class handed in their first PowerPoint/VBA projects
(some of which will be appearing on my Web site under Examples From Real
People). Note that most of the students in the class are teachers and
have little or no programming background. When I asked for questions, one
young man timidly raised his hand and said "Is this stuff supposed to be
really hard?" I assured him that it was, indeed, supposed to be really
hard as three-quarters of the class nodded in agreement as if they had
been wondering the same thing.

--David

--
David M. Marcovitz
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
Z

Zigzag

Hi David,

Lol

I hope that as a seasoned lecturer you still have sympathy for the poor
little mites ;-)
I remember an Operational Research lecturer eons ago losing his patience
(sic) whenever a student didn't get his meaning on being told something for
the first time. It was interesting to watch grown men (including a
lay-preacher and an IT department head) making excuses for bunking (hope
that's not a rude term in American-speak) out of his lessons.
Still, I know it can be a bit baffling when a student doesn't understand
something you feel is obvious through experience. I also have 2 teenagers of
my own. 'Nough said.

Regards

Zig
 
D

David M. Marcovitz

Actually, since the students were all handing in their projects at that
time, they had all figured it out (or at least most of it) already as of
last night. I think they were just surprised that I would make them do
something so hard. What catches me off guard is when they assume I think
they are having an easy time with it. This is only a problem if it gets
to the point where they are too embarassed to ask questions, thinking
that it should be easy.
--David

--
David M. Marcovitz
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
Z

Zigzag

Hi David,

Indeed, until they realise that you are deliberately setting the work hard
and then you start finding the screws in your chair have worked loose ;-)

I've drilled into my 2 sprogs since kindergarten that if they don't
understand something then ask. It's better to be embarassed than ignorant,
especially with school education. If the foundation is not there how can
they be expected to learn the more complex ideas based upon that foundation.
The problem in a lot of cases is peer pressure.

Zig
 
Z

Zigzag

Hi Steve,
Sometimes it records nothing,

I noticed this when trying to record some of the custom animation.
And after you've had your wrist slapped a few times, you develop a pretty
fair instinct for what'll work and what won't.

The latter is the norm in my case and my wrists are so sore I'm back to
typing with my nose.

xoh
 
G

Glen Millar

The latter is the norm in my case and my wrists are so sore I'm back to
Stop your whining. I've been poking at PPT with VBA since before version 97
was released. I'll show you sore wrists!!! ;-)

Your wrists... his nose. I just started with this vba stuff. Knock it off.
You guys are scaring me!
 
Z

Zigzag

Hi Steve,
Stop your whining.

Sorry, the hearing aid's playing up again.
I've been poking at PPT with VBA since before version 97
was released.

Was that when it stood for Virtually Before Adam?
I'll show you sore wrists!!!

Easy! this is a family forum ;-)

Misinterpretation, selective extraction and contextual misalignment are arts
of the politician.

Zig
 
Z

Zigzag

Hi all,
When you click on either of the small textboxes look closely at where the
cursor changes to a hand. On one of them the cursor will change over the
whole textbox and on the other it will change only around the textbox
edge.

Not that I want to extend this thread any further, (cheers all round), but
for completeness I have just packaged and run the presentation on my machine
using the ppt viewer with 2003 and there is no problem clicking on the
textboxes. Still does it from ppt tho'.

No reply expected.

Cheers

Zig
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top