Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default combos and dates

Hello
I am trying to create three combos (day, month and year) i could just
enter each day, each month and each year i want to the user to have the
options to use. However i am sure i have seen some code which only
allows the correct day to be shown depending on the month and year
selected. can anyone help with this? I would also like todays date to
be shown as the default day, month and year but have no idea how to go
about it. at the moment im just using the =now() option to get todays
date and not giving the user an option to select different.
Any help would be great! Thanks as always!
Shorty

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default combos and dates

Shorty,

You can use the Microsoft Date and Time Picker control 6.0 (sp4) in Excel
2000. It defaults to todays date and looks like a combo box. When you click
the down arrow a calendar pops up below the combo box allowing you to click
left and right buttons to go back or forward a month at a time.

You can find it in the control toolbox under the "More controls" button that
looks like a hammer and wrench with three dots underneath them.
--
Billy Rogers

Dallas,TX

Currently Using Office 2000


"Shorty" wrote:

Hello
I am trying to create three combos (day, month and year) i could just
enter each day, each month and each year i want to the user to have the
options to use. However i am sure i have seen some code which only
allows the correct day to be shown depending on the month and year
selected. can anyone help with this? I would also like todays date to
be shown as the default day, month and year but have no idea how to go
about it. at the moment im just using the =now() option to get todays
date and not giving the user an option to select different.
Any help would be great! Thanks as always!
Shorty


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default combos and dates

Thanks for that, ive had a look in there but cant find the date and
time picker, is there anyway to download this option or just to insert
the VB code for it? im using excel 2000 but dont know what SP it is.
Thanks,
Shorty

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default combos and dates

found the file i need to download at:
http://support.microsoft.com/kb/297381/en-us
however once i put the Microsoft Date and Time Picker control 6.0 on
the worksheet, i cant select any information and the drop down/calendar
wont load up, any suggestions?
Shorty

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default combos and dates

quick note for the above post, the Microsoft Date and Time Picker
control 6.0 is SP6 will this make a difference?



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default combos and dates

Shorty,

I'm not sure if this is the problem, but when you place the control on the
sheet you autmatically go into design mode. In order to use the control you
need to exit design mode by clicking the icon on the control toolbox toolbar
that looks like a green triangle with a pencil. To link the control to a
cell, make sure you are in design mode and right click and select properties
and set the linked cell property to a cell address.

I'm not sure about differences with sp6.
--
Billy Rogers

Dallas,TX

Currently Using Office 2000


"Shorty" wrote:

quick note for the above post, the Microsoft Date and Time Picker
control 6.0 is SP6 will this make a difference?


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default combos and dates

I have tried to link the control to a cell, It shows the date in the
linked cell which is great. Though for some reason i still can not
change the value in the date box. I have linked it to a cell, set min
and max dates and enabled the check box. here is the code i get when
double clicking on the date box

Private Sub DTPicker1_CallbackKeyDown(ByVal KeyCode As Integer, ByVal
Shift As Integer, ByVal CallbackField As String, CallbackDate As Date)
End Sub

Should be some more code in here?

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default combos and dates

You don't need to add any code to be able to select a date. There should be
a calendar that pops up when you click the down arrow. If that's not working
I don't know what is wrong. The only thing I can think of is that you need
to make sure you aren't in design mode. The code that comes up when you
click the control in design mode is fine. It's just a shell for adding code.

there is another calendar control "Calendar Control 9.0" . It basically does
the same thing except the calendar stays visible, it doesn't hide after you
select a date.
--
Billy Rogers

Dallas,TX

Currently Using Office 2000


"Shorty" wrote:

I have tried to link the control to a cell, It shows the date in the
linked cell which is great. Though for some reason i still can not
change the value in the date box. I have linked it to a cell, set min
and max dates and enabled the check box. here is the code i get when
double clicking on the date box

Private Sub DTPicker1_CallbackKeyDown(ByVal KeyCode As Integer, ByVal
Shift As Integer, ByVal CallbackField As String, CallbackDate As Date)
End Sub

Should be some more code in here?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
table of # of rows with unique combos of values in 4 separated col louise Excel Worksheet Functions 7 June 5th 08 05:49 AM
Comparing two combos/cells to return a value [email protected] Excel Worksheet Functions 0 October 2nd 07 06:47 PM
Entering combos without converting it to dates? pkroper22 Excel Discussion (Misc queries) 2 February 28th 06 01:39 PM
too many combos VOG Excel Programming 1 October 13th 05 05:31 PM
one sub for many Combos in different way jochynator Excel Programming 0 November 24th 04 11:45 PM


All times are GMT +1. The time now is 05:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"