How do you stop the content from repeating in the combobox even if you click
the action buttion more than once? Please see the folowing code...
Thanks!
Sub ComboBox1_Change()
ComboBox1.AddItem ("Proprietary Information")
ComboBox1.AddItem ("Employee Information")
ComboBox1.AddItem ("Customer Information")
ComboBox1.AddItem ("Personal Information")
ComboBox1.AddItem ("Other Information")
End Sub
1. You could name the action button the macro is tied to (ButtonClicked) and
have a line of code that hides the button after clicked. That way you can't
click it again. You would obviously need some sort of "initialization" code
that set it back to True so when you get to the slide it is visible. If the
button is on Slide 1, the code to hide it would be (after it is named of
course):
ActivePresentation.Slides(1).Shapes("ButtonClicked").Visible = False
2. You could have a variable "ButtonClicked" that is set to False upon some
sort of initialization. When the button is clicked, it runs an IF...Then
clause. If it is "False" it loads the ComboBox with your stuff, THEN sets
"ButtonClicked" to True. If you click the button again, it will skip the
ComboBox AddItem part of the code and just exit the Sub.
--
Bill Foley, Microsoft MVP (PowerPoint)
Microsoft Office Specialist Master Instructor - XP
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
"Nikki" <Ni...@discussions.microsoft.com> wrote in message
news:A1702DC8-B750-49C7...@microsoft.com...
Private Sub ComboBox1_GotFocus()
If ComboBox1.ListCount < 2 Then
ComboBox1.AddItem ("Proprietary Information")
ComboBox1.AddItem ("Employee Information")
ComboBox1.AddItem ("Customer Information")
ComboBox1.AddItem ("Personal Information")
ComboBox1.AddItem ("Other Information")
End If
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 your questions, before com
you think to ask them.
Change org to com to defuse anti-spam,
ant-virus, anti-nuisance misdirection.
.
.
"Nikki" <Ni...@discussions.microsoft.com> wrote in message
news:A1702DC8-B750-49C7...@microsoft.com...
--
Bill Foley, Microsoft MVP (PowerPoint)
Microsoft Office Specialist Master Instructor - XP
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
"Bill Dilworth" <vest...@yahoo.org> wrote in message
news:%23Tw9hRC...@TK2MSFTNGP10.phx.gbl...
Sub ComboBox1_Change()
ComboBox1.Clear
ComboBox1.AddItem ("Proprietary Information")
ComboBox1.AddItem ("Employee Information")
ComboBox1.AddItem ("Customer Information")
ComboBox1.AddItem ("Personal Information")
ComboBox1.AddItem ("Other Information")
End Sub
- Chirag
PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html
"Nikki" <Ni...@discussions.microsoft.com> wrote in message
news:A1702DC8-B750-49C7...@microsoft.com...
Does it have to be "Private Sub" as opposed to "Sub"? How are the two
different?
Then
> ComboBox1.AddItem ("Proprietary Information")
> ComboBox1.AddItem ("Employee Information")
> ComboBox1.AddItem ("Customer Information")
> ComboBox1.AddItem ("Personal Information")
> ComboBox1.AddItem ("Other Information")
> End If
> 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 your questions, before com
> you think to ask them.
>
> Change org to com to defuse anti-spam,
> ant-virus, anti-nuisance misdirection.
> ..
> ..
--
Bill Foley, Microsoft MVP (PowerPoint)
Microsoft Office Specialist Master Instructor - XP
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
"Chirag" <my_email_is@my_website.com> wrote in message
news:OVNAqWCR...@TK2MSFTNGP15.phx.gbl...
However, you can still combine the two methods and use:
Sub ComboBox1_Change()
If ComboBox1.listCount <2 then
ComboBox1.Clear
ComboBox1.AddItem ("Proprietary Information")
ComboBox1.AddItem ("Employee Information")
ComboBox1.AddItem ("Customer Information")
ComboBox1.AddItem ("Personal Information")
ComboBox1.AddItem ("Other Information")
End If
End Sub
Thanks again!
- Chirag
PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html
"Bill Dilworth" <vest...@yahoo.org> wrote in message
news:eTvaE8CR...@TK2MSFTNGP14.phx.gbl...