control elements

  • Thread starter Thread starter Axel Beil
  • Start date Start date
A

Axel Beil

Does anybody has an idea what I have to do to make a
commandbutton or any control element invisible during a
presentation.

Changing the property "visible" does have an effect, but
only after the presentation (this is my experiences).

Best regards,
Axel
 
I'm not sure what you mean. If the button is created with the PowerPoint
drawing tools, let's say a rectangle, you can give it "No Fill" and "No Line"
and it will be invisible. You can do the same with any Autoshape. Is that what
you need?
 
Sonia, I assume this is a coding question, and he is referring to a
button drawn with the control tools, not the regular drawing tools.

Axel, what are you doing to hide the button? The following code works
for me:

Slide1.CommandButton1.Visible = False

That line takes the command button CommandButton1 on slide 1 and makes it
invisible. When I do this, it hides it right away and does not wait
until after the presentation.

--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/
 
Thanks. All people look alike except when they have VBA tattooed on their
forehead. I couldn't see his forehead. <G>
 
The VBA tattoo was there for you to see, but you had to run the following
code:

If ForeHead.HasTattoo Then
ForeHead.Visible = True
End If

--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/
 
Booo Hisss - You sir are spending too much time around us punsters. You
better watch it or you will get Steve's reputation :)
 
The one where he is slightly translucent, glows from within and hovers
several feet above the ground?
 
Booo Hisss - You sir are spending too much time around us punsters. You
better watch it or you will get Steve's reputation :)

And what's wrong with THAT?

(If we stick it on his back, I won't have to carry it around any more)
 
Dear all,
actually, I did not expect to get such a prompt response.
David, you are right, I am referring to a VBA coding
problem. I don't think, your solution will work, since I
think I tried it already, however I try out again later
this day.

Once again to my problem.
I want to produce a presentation like Geopardy, where I
have lots of commandbuttons in a mayor slide from where I
want to jump to other slides and then back to this slide
again. However, I need to ensure, that a jump will only
performed once. Therefore I need to make the
commandbottons I pressed invisible on the mayor slide
after pressing it.

What I already tried is to put a coding in the
commandbutton.click event like
slide1.commandbutton.visible = false
and then jump to the other slide. However, when I jump
back to the mayor slide, I still found the commandbutton
visible. Only, when I quit the presentation the
commandbutton turned to invisible. So it seems for me that
my command is only performed after the presentation or the
slide is not refreshed.

I hope it is more clear now.

Thanks for your help.

Axel
 
Why not use auto shapes with action settings instead of command buttons.
The functionality is the same, but the problems are far less. They will
become invisible immediately.

You could replace:
Private Sub CommandButton1_Click()
'Category 1 Question 1
'Blah blah blah
End Sub

Private Sub CommandButton2_Click()
'Category 2 Question 2
'Blah blah blah
End Sub



With a single routine that would pull all the information from 2 tags on the
shapes:

Private Sub AutoShape(oShp As Shape)

Dim RefSld As Integer
Dim Value As Integer

'Set the value being wagered based on _
a tag on the square that was clicked
Value = oShp.Tags("Value")

'Set the slide that the "Answer" is on _
based on a tag on the square that was clicked
RefSld = oShp.Tags("SlideNumber")

oShp.Visible = msoFalse
ActivePresentation.SlideShowWindow _
.View.GotoSlide RefSld

End Sub

--

Bill Dilworth
Microsoft PPT MVP Team
Users helping fellow users.
===============
Please spend a few minutes checking vestprog2@
out www.pptfaq.com This link will yahoo.
answer most of our questions, before com
you think to ask them.

Change org to com to defuse anti-spam,
ant-virus, anti-nuisance misdirection.
..
..
 
Hi,
I tried this, but did not even get your subroutine called
from the running presentation.

I used a simple rectangular auto shape and put the action
settings "on mouse click" to "Macro". Private sub routines
cannot be chosen so I had to creat first a macro (standard
sub routine) and put than the name of the macro to the
action settings, but event then the macro is not called
during presentation (I checked with the break points). It
should be no problem, but I don't get any visual basic
macro called from the action settings - do you know where
the problem is?

Even if I get a macro called, how do I get your private
subroutine called or should I changed your subroutine into
a global sub routine and use it as a macro itself?

Thanks for your help,
Axel
 
If you are going to use regular autoshapes, create a new module (go to
the Insert menu and choose Module while in the VBA editor). This module
should be named Module1 (or possibly a higher number). Put everything
you want to use in this module. This will simplify everything. It won't
work for the control toolbox stuff, but it will work if you get rid of
the control toolbox stuff. Private and Public won't matter if it is all
in the same module.
--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/
 
Back
Top