PC Review


Reply
Thread Tools Rate Thread

Command Button Query

 
 
Neil
Guest
Posts: n/a
 
      24th Mar 2004
Hi All,

I have prepared a rather large master presentation that I will open with a
menu screen that presents users with a command button.

I would like to have the caption on the command button change each time it
is pressed, ie. from 'Sales' to 'Marketing' to 'Engineering', the macro
reading the current state of the button (caption) and hiding slides that are
not relevant to the department the user has selected.

I have done this before using Visual Basic in Excel though I'm not sure of
the syntax for Powerpoint.

My macro will run something like:

Make all sheets visible,
If button.caption = 'Sales',
hide slides 2,3,4 and 9 then
button.caption = "Marketing'


Elseif button.caption = 'Marketing',
make all sheets visible, hide slides 2,7,11 then
button.caption = 'Engineering'.......


Can you please assist with correct object identifiers for command buttons in
PowerPoint..

Thanks,

Neil


 
Reply With Quote
 
 
 
 
Bill Foley
Guest
Posts: n/a
 
      24th Mar 2004
Why not just have three action buttons with "Sales", "Marketing", and
"Engineering" on them. Create three simple macros that each run a different
custom show. To create Custom Shows, click "Slide Show", "Custom Show".
Give each one a name and select the slides you wish to view on each custom
show. Once that is done, click "ALT-F1" to enter the VBE window, click the
"Insert" menu and select "Module", and paste in these three macros (assuming
they are named "Custom Show 1", etc.):

Sub CustomShow1()
SlideShowWindows(1).View.GotoNamedShow "Custom Show 1"
End Sub

Sub CustomShow2()
SlideShowWindows(1).View.GotoNamedShow "Custom Show 2"
End Sub

Sub CustomShow2()
SlideShowWindows(1).View.GotoNamedShow "Custom Show 2"
End Sub

Just have an action button on the last slide of each of the three shows that
link back to the Menu Slide with these three buttons on them.
--
Bill Foley, Microsoft MVP (PowerPoint)
www.pttinc.com
Check out PPT FAQs at: http://www.rdpslides.com/pptfaq/
Check out Word FAQs at: http://word.mvps.org/FAQs/General/index.htm

"Neil" <(E-Mail Removed)> wrote in message
news:c3rpn4$4mr$(E-Mail Removed)...
> Hi All,
>
> I have prepared a rather large master presentation that I will open with a
> menu screen that presents users with a command button.
>
> I would like to have the caption on the command button change each time it
> is pressed, ie. from 'Sales' to 'Marketing' to 'Engineering', the macro
> reading the current state of the button (caption) and hiding slides that

are
> not relevant to the department the user has selected.
>
> I have done this before using Visual Basic in Excel though I'm not sure of
> the syntax for Powerpoint.
>
> My macro will run something like:
>
> Make all sheets visible,
> If button.caption = 'Sales',
> hide slides 2,3,4 and 9 then
> button.caption = "Marketing'
>
>
> Elseif button.caption = 'Marketing',
> make all sheets visible, hide slides 2,7,11 then
> button.caption = 'Engineering'.......
>
>
> Can you please assist with correct object identifiers for command buttons

in
> PowerPoint..
>
> Thanks,
>
> Neil
>
>



 
Reply With Quote
 
Chirag
Guest
Posts: n/a
 
      24th Mar 2004
Bill's suggestion is a good one. You can implement the same suggestion
without using any macros too. Hyperlink the shape to the particular custom
show. This will do the job.

- Chirag

PowerShow - View multiple shows simultaneously
http://officeone.mvps.org/powershow/powershow.html

"Bill Foley" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Why not just have three action buttons with "Sales", "Marketing", and
> "Engineering" on them. Create three simple macros that each run a

different
> custom show. To create Custom Shows, click "Slide Show", "Custom Show".
> Give each one a name and select the slides you wish to view on each custom
> show. Once that is done, click "ALT-F1" to enter the VBE window, click

the
> "Insert" menu and select "Module", and paste in these three macros

(assuming
> they are named "Custom Show 1", etc.):
>
> Sub CustomShow1()
> SlideShowWindows(1).View.GotoNamedShow "Custom Show 1"
> End Sub
>
> Sub CustomShow2()
> SlideShowWindows(1).View.GotoNamedShow "Custom Show 2"
> End Sub
>
> Sub CustomShow2()
> SlideShowWindows(1).View.GotoNamedShow "Custom Show 2"
> End Sub
>
> Just have an action button on the last slide of each of the three shows

that
> link back to the Menu Slide with these three buttons on them.
> --
> Bill Foley, Microsoft MVP (PowerPoint)
> www.pttinc.com
> Check out PPT FAQs at: http://www.rdpslides.com/pptfaq/
> Check out Word FAQs at: http://word.mvps.org/FAQs/General/index.htm
>
> "Neil" <(E-Mail Removed)> wrote in message
> news:c3rpn4$4mr$(E-Mail Removed)...
> > Hi All,
> >
> > I have prepared a rather large master presentation that I will open with

a
> > menu screen that presents users with a command button.
> >
> > I would like to have the caption on the command button change each time

it
> > is pressed, ie. from 'Sales' to 'Marketing' to 'Engineering', the macro
> > reading the current state of the button (caption) and hiding slides that

> are
> > not relevant to the department the user has selected.
> >
> > I have done this before using Visual Basic in Excel though I'm not sure

of
> > the syntax for Powerpoint.
> >
> > My macro will run something like:
> >
> > Make all sheets visible,
> > If button.caption = 'Sales',
> > hide slides 2,3,4 and 9 then
> > button.caption = "Marketing'
> >
> >
> > Elseif button.caption = 'Marketing',
> > make all sheets visible, hide slides 2,7,11 then
> > button.caption = 'Engineering'.......
> >
> >
> > Can you please assist with correct object identifiers for command

buttons
> in
> > PowerPoint..
> >
> > Thanks,
> >
> > Neil
> >
> >

>
>



 
Reply With Quote
 
Neil
Guest
Posts: n/a
 
      26th Mar 2004
Thanks guys,

This certainly beats having to go the route of macros.....

Regards,

Neil




"Chirag" <my_email_is@my_website.com> wrote in message
news:(E-Mail Removed)...
> Bill's suggestion is a good one. You can implement the same suggestion
> without using any macros too. Hyperlink the shape to the particular custom
> show. This will do the job.
>
> - Chirag
>
> PowerShow - View multiple shows simultaneously
> http://officeone.mvps.org/powershow/powershow.html
>
> "Bill Foley" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Why not just have three action buttons with "Sales", "Marketing", and
> > "Engineering" on them. Create three simple macros that each run a

> different
> > custom show. To create Custom Shows, click "Slide Show", "Custom Show".
> > Give each one a name and select the slides you wish to view on each

custom
> > show. Once that is done, click "ALT-F1" to enter the VBE window, click

> the
> > "Insert" menu and select "Module", and paste in these three macros

> (assuming
> > they are named "Custom Show 1", etc.):
> >
> > Sub CustomShow1()
> > SlideShowWindows(1).View.GotoNamedShow "Custom Show 1"
> > End Sub
> >
> > Sub CustomShow2()
> > SlideShowWindows(1).View.GotoNamedShow "Custom Show 2"
> > End Sub
> >
> > Sub CustomShow2()
> > SlideShowWindows(1).View.GotoNamedShow "Custom Show 2"
> > End Sub
> >
> > Just have an action button on the last slide of each of the three shows

> that
> > link back to the Menu Slide with these three buttons on them.
> > --
> > Bill Foley, Microsoft MVP (PowerPoint)
> > www.pttinc.com
> > Check out PPT FAQs at: http://www.rdpslides.com/pptfaq/
> > Check out Word FAQs at: http://word.mvps.org/FAQs/General/index.htm
> >
> > "Neil" <(E-Mail Removed)> wrote in message
> > news:c3rpn4$4mr$(E-Mail Removed)...
> > > Hi All,
> > >
> > > I have prepared a rather large master presentation that I will open

with
> a
> > > menu screen that presents users with a command button.
> > >
> > > I would like to have the caption on the command button change each

time
> it
> > > is pressed, ie. from 'Sales' to 'Marketing' to 'Engineering', the

macro
> > > reading the current state of the button (caption) and hiding slides

that
> > are
> > > not relevant to the department the user has selected.
> > >
> > > I have done this before using Visual Basic in Excel though I'm not

sure
> of
> > > the syntax for Powerpoint.
> > >
> > > My macro will run something like:
> > >
> > > Make all sheets visible,
> > > If button.caption = 'Sales',
> > > hide slides 2,3,4 and 9 then
> > > button.caption = "Marketing'
> > >
> > >
> > > Elseif button.caption = 'Marketing',
> > > make all sheets visible, hide slides 2,7,11 then
> > > button.caption = 'Engineering'.......
> > >
> > >
> > > Can you please assist with correct object identifiers for command

> buttons
> > in
> > > PowerPoint..
> > >
> > > Thanks,
> > >
> > > Neil
> > >
> > >

> >
> >

>
>



 
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
Opening a query from a command button paul bennett Microsoft Access Form Coding 2 4th May 2010 05:39 PM
Query Command Button Problem Shari Microsoft Access Queries 3 5th Feb 2008 08:30 PM
Command Button Query Bob Microsoft Access 3 13th Dec 2006 11:35 PM
Query/command button Cyp Microsoft Access 4 23rd Apr 2004 08:26 PM
Command Button error with query TC Microsoft Access Form Coding 2 17th Nov 2003 02:14 AM


Features
 

Advertising
 

Newsgroups
 


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