Home power point drop box
Reply: 1

power point drop box

Mr Nemo
Mr Nemo Published in 2018-01-12 15:56:25Z

I have created the following dropbox in a power point presentation, I would like to be able to extend the number of dates available to the user to around 10 years. This clearly is a lot of dates and having to hard code around 3600 days is clearly not efficient. Is there anyway of being able to reference a named range, as you would in excel? Could you reference a named range in some kind of a supporting spreadsheet?

 Private Sub ComboBox1_GotFocus()
 If ComboBox1.ListCount = 0 Then
 End If
 End Sub

 Sub AddDropDownItems()
 ComboBox1.AddItem "10/02/2007"
 ComboBox1.AddItem "11/02/2007"
 ComboBox1.AddItem "12/02/2007"
 ComboBox1.ListRows = 3600
 End Sub


braX Reply to 2018-01-12 16:15:42Z

You will want to use a loop so you dont have all of those individual lines:

Dim nIndex As Integer
For nIndex = 0 To 3600
  ComboBox1.AddItem DateAdd("m", nIndex, CVDate("10/02/2007"))

You can change the "m" (month) to "d" (days) if you want to increment by days.

DateAdd Function

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.325578 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO