PC Review


Reply
Thread Tools Rate Thread

Checkbox to hide a picture

 
 
=?Utf-8?B?UmljaA==?=
Guest
Posts: n/a
 
      26th Sep 2005
I have inserted several pictures into PowerPoint, all of which have
transparent backgrounds. I have also added several Check-boxes into the
presentation.
I was hoping that a user could, whilst in the slideshow viewer, click any
combination of the tickboxes and the relevant pictures would be either hidden
from view or displayed. Rather like a series of layers. Since they are all
transparent, you can see through all of them to the background.

The checkbox lniks through to some VBA code...but I cannot figure out what
code I should be putting in. Using the Macro recorder, the following was
suggested...but it didn't work. I could put an "If Checkbox = TRUE" around
it if required. Any ideas how I could make it work?

ActiveWindow.Selection.SlideRange.Shapes("Picture 7").Select
With ActiveWindow.Selection.ShapeRange
.Height = 0#
.Width = 0#
.PictureFormat.CropLeft = 113.38
.PictureFormat.CropRight = 113.38
.PictureFormat.CropTop = 28.34
.PictureFormat.CropBottom = 28.34
End With

 
Reply With Quote
 
 
 
 
Ute Simon
Guest
Posts: n/a
 
      26th Sep 2005
> I have inserted several pictures into PowerPoint, all of which have
> transparent backgrounds. I have also added several Check-boxes into the
> presentation.
> I was hoping that a user could, whilst in the slideshow viewer, click any
> combination of the tickboxes and the relevant pictures would be either

hidden
> from view or displayed. Rather like a series of layers. Since they are

all
> transparent, you can see through all of them to the background.


If you are using PowerPoint 2002 or 2003, you don't need VBA code for this.
You can use trigger animations to make the pictures visible and invisible.
(And even fake a box being ticked, if necessary.)

Kind regards,
Ute

--
Ute Simon
Microsoft PowerPoint MVP Team und PowerPoint-User-Team
Tipps, Tricks und Kostenloser Newsletter: www.ppt-user.de
Infos zu den PowerPoint-Anwendertagen: www.powerpoint-anwendertage.de


 
Reply With Quote
 
=?Utf-8?B?UmljaA==?=
Guest
Posts: n/a
 
      26th Sep 2005
Unfortunately, I am using PowerPoint 2000! Sorry, I neglected to put this in
my original post...any more info or help?

"Ute Simon" wrote:

> > I have inserted several pictures into PowerPoint, all of which have
> > transparent backgrounds. I have also added several Check-boxes into the
> > presentation.
> > I was hoping that a user could, whilst in the slideshow viewer, click any
> > combination of the tickboxes and the relevant pictures would be either

> hidden
> > from view or displayed. Rather like a series of layers. Since they are

> all
> > transparent, you can see through all of them to the background.

>
> If you are using PowerPoint 2002 or 2003, you don't need VBA code for this.
> You can use trigger animations to make the pictures visible and invisible.
> (And even fake a box being ticked, if necessary.)
>
> Kind regards,
> Ute
>
> --
> Ute Simon
> Microsoft PowerPoint MVP Team und PowerPoint-User-Team
> Tipps, Tricks und Kostenloser Newsletter: www.ppt-user.de
> Infos zu den PowerPoint-Anwendertagen: www.powerpoint-anwendertage.de
>
>
>

 
Reply With Quote
 
c mateland
Guest
Posts: n/a
 
      27th Sep 2005
Rich, this is not tested and there may be an easier way, but off the
top of my head, try modeling something like this in the module.

You'll have to adjust the code for the name of your checkboxes and name
of your pictures.

Private Sub CheckBox1_Click()
With ActivePresentation.Slides.Range.Shapes("Picture 4")
If CheckBox1 = True Then
.Visible = True
Else
.Visible = False
End If
End With
End Sub

-Charles

Rich wrote:
> Unfortunately, I am using PowerPoint 2000! Sorry, I neglected to put this in
> my original post...any more info or help?


 
Reply With Quote
 
=?Utf-8?B?UmljaA==?=
Guest
Posts: n/a
 
      27th Sep 2005
Thanks for the solution. It did not work, but instead I used the following.
Might not be the pretiest, but it does seem to do the job!

Set myDocument = ActivePresentation.Slides(4)
If CheckBox2 = True Then
With myDocument.Shapes(3).PictureFormat
.CropLeft = 4 * 28.3464567
End With
Else
With myDocument.Shapes(3).PictureFormat
.CropLeft = 22 * 28.3464567
End With
End If


"c mateland" wrote:

> Rich, this is not tested and there may be an easier way, but off the
> top of my head, try modeling something like this in the module.
>
> You'll have to adjust the code for the name of your checkboxes and name
> of your pictures.
>
> Private Sub CheckBox1_Click()
> With ActivePresentation.Slides.Range.Shapes("Picture 4")
> If CheckBox1 = True Then
> .Visible = True
> Else
> .Visible = False
> End If
> End With
> End Sub
>
> -Charles
>
> Rich wrote:
> > Unfortunately, I am using PowerPoint 2000! Sorry, I neglected to put this in
> > my original post...any more info or help?

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: hide a checkbox Marshall Barton Microsoft Access Reports 0 2nd Sep 2008 09:40 PM
RE: hide a checkbox NetworkTrade Microsoft Access Reports 0 2nd Sep 2008 09:29 PM
Hide & Unhide with a Checkbox =?Utf-8?B?Sm9uYXRoYW4=?= Microsoft Excel Programming 5 5th Oct 2005 12:16 PM
hide rows from checkbox =?Utf-8?B?UWFzcGVj?= Microsoft Excel Programming 1 25th May 2005 10:32 PM
hide checkbox on report deb Microsoft Access Getting Started 2 14th Jan 2004 09:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:08 PM.