PC Review


Reply
Thread Tools Rate Thread

Date selector combobox

 
 
Steve P
Guest
Posts: n/a
 
      18th Nov 2008
Hello Excel gurus...

I am building a userform that will be used to drive a search engine for a
project I'm working on. I have two comboboxes on the form and want the two
comboboxes to be used to select a "start" date and a "end" date to select a
user specified date range. What is the best way to accomplish this?
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      18th Nov 2008
If the dates that the user can choose are known, you could add the dates when
you load the userform:

Option Explicit
Private Sub Userform_Initialize()
dim myDate as date
for mydate = dateserial(2008,1,1) to dateserial(2008,2,12)
me.combobox1.additem format(mydate,"mmmm dd, yyyy")
next mydate
end sub

But if there are lots and lots of dates, this becomes a pain for the user to
find the correct date to choose.

You may want to consider using a calendar control.

Ron de Bruin has some notes:
http://www.rondebruin.nl/calendar.htm

Or even 3 different controls (day, month, year) for each date.

Steve P wrote:
>
> Hello Excel gurus...
>
> I am building a userform that will be used to drive a search engine for a
> project I'm working on. I have two comboboxes on the form and want the two
> comboboxes to be used to select a "start" date and a "end" date to select a
> user specified date range. What is the best way to accomplish this?


--

Dave Peterson
 
Reply With Quote
 
Mike
Guest
Posts: n/a
 
      18th Nov 2008
There are Calendar controls you can use on your form.

"Steve P" wrote:

> Hello Excel gurus...
>
> I am building a userform that will be used to drive a search engine for a
> project I'm working on. I have two comboboxes on the form and want the two
> comboboxes to be used to select a "start" date and a "end" date to select a
> user specified date range. What is the best way to accomplish this?

 
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
WPF using a ComboBox as a record selector Bill McCormick Microsoft C# .NET 2 28th May 2009 10:49 PM
WPF using a ComboBox as a record selector Bill McCormick Microsoft C# .NET 0 28th May 2009 10:08 PM
Date Selector Enyaw Microsoft Excel Programming 1 11th Dec 2008 08:22 PM
Add date selector for 'Close Date' on an Opportunity =?Utf-8?B?TGVpZ2h0b24=?= Microsoft Outlook BCM 0 27th Apr 2006 05:39 AM
ComboBox as information selector from another table Xyan Microsoft Access Forms 0 28th Aug 2003 10:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:28 PM.