Home power point drop box

# power point drop box

Mr Nemo
1#
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 AddDropDownItems 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  Thanks
braX
2#
 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")) Next  You can change the "m" (month) to "d" (days) if you want to increment by days. DateAdd Function