View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
TiredAlison TiredAlison is offline
external usenet poster
 
Posts: 3
Default Combo Box Showing Date Selections


"smartin" wrote:

TiredAlison wrote:
Hi
I have a spreadsheet with a combo box setup. I want it to display in the
pull down dates in the format dd/mm/yy from todays date - 5 days to todays
date + 30 days. I have searched the help and discussion post and found code
to get it to pull down in the format mm/dd/yy from a specific date but I am
not clever enough to alter this to what I want. If you want me to post the
code I have so far let me know.
thanking you in advance for this help.


If you are using the VB combo, you could try something like this:

For i = -5 To 30
Sheet1.ComboBox1.AddItem Format(Date + i, "dd/mm/yyyy")
Next i
.
Thanks for your help but when I cleared out all my code and only put your code in it doesn't display anything in the pulldown. When I try and type a value I get "Compile Error. Method or data member not found". I entered the code by going into design mode and view code. It called the subroutine ComboBox1_Change().