+ Reply to Thread
Results 1 to 8 of 8

Date and Time Picker Control 6.0 (SP4) set to blank/ at todays date

  1. #1
    Forum Contributor
    Join Date
    04-19-2013
    Location
    Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    297

    Date and Time Picker Control 6.0 (SP4) set to blank/ at todays date

    I am trying to find a way to have my Date and Time Picker Controls to ideally be blank before any selection is made, or alternatively show have use the present date as default.

    Can't find it on properties, so I am assuming it might be VBA, so far found this but I don't quite understand what it's all about:

    http://support.microsoft.com/kb/238077


    Any ideas?

    Thanks in advance

    Strud

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Date and Time Picker Control 6.0 (SP4) set to blank/ at todays date

    Hi,

    Can you please upload your workbook for me to take a look at in context?

    You are correct that it needs to be done in VBA, but that link refers to C++.NET code, which may be why you don't understand it :P

    Thanks

  3. #3
    Forum Contributor
    Join Date
    04-19-2013
    Location
    Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    297

    Re: Date and Time Picker Control 6.0 (SP4) set to blank/ at todays date

    ah that will be why.

    Unfortunately, I really can't upload my workbook because it would take too long to desensitise the data.

    But I will expand a bit- essentially I have set up a sheet that allows the user to access sales data.

    The user makes selections using two date and time pickers- and the relevant sales figures are returned. The date and time pickers currently just remain at the date of last selection- I would like them to reset each time either displaying something like --/--/--- or today's date...so a fresh selection can be made from the same point each time.

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Date and Time Picker Control 6.0 (SP4) set to blank/ at todays date

    Assuming the name of you control is "DateTimePicker1", have you tried
    Please Login or Register  to view this content.
    And if this doesn't work, try
    Please Login or Register  to view this content.
    To set it to blank instead, try
    Please Login or Register  to view this content.
    Hope this helps

  5. #5
    Forum Contributor
    Join Date
    04-19-2013
    Location
    Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    297

    Re: Date and Time Picker Control 6.0 (SP4) set to blank/ at todays date

    Hi ajryan, thanks for your help, but when I use that code it comes up with the error message:

    "Run-time error 424: Object Required"

    And this happens even when I use the one with 'setfocus' in there...not too sure why

  6. #6
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Date and Time Picker Control 6.0 (SP4) set to blank/ at todays date

    That is strange.

    Sorry it has taken me so long to respond. I couldn't get the control installed on my machine and it took me ages to work out how to fix it lol.

    I tried the code above and it works fine on mine...

    Is the control on a worksheet or on a userform?

    Is there any way that you could make a sample workbook to upload here with a control on it, such that you can replicate the error on your machine? That way I might have some chance of being useful towards helping you, because I can't really help if I can't replicate the issue on my end, as it doesn't make sense to me why you would be getting that error message with the code that I provided.

    Sorry to not have solved this yet. Hope I can fix it soon for you though

  7. #7
    Registered User
    Join Date
    12-07-2013
    Location
    NC, USA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Unhappy Re: Date and Time Picker Control 6.0 (SP4) set to blank/ at todays date

    I feel like this thread is appropriate to receive some assistance on a problem I'm facing:

    I have =EMBED("MSComCtl2.DTPicker.2","") incorporated in a workbook that I'm striving to use in conjunction with =TODAY() for some conditional formatting.

    My formulas are pretty straightforward and work...=IF(AND(A2>=F4,A2<=F4+7),"ON TIME","NO")

    The odd situation that I was literally about to break my computer screen, for no real good reason outside of frustration, is that the formula would not work when I would change the dates in the 'calendar dropdown menu' - I couldn't figure it out for the life of me, but while still frustrated I carried on...

    The problem was not in any type of error in writing on formulas but was with the drop down menu

    =EMBED("MSComCtl2.DTPicker.2","")

    Oddly enough EXCEL will not calculate correctly the formula unless I:

    1) Double-Click on the cell after selecting a date

    &

    2) Click Enter

    The information is populated in the cell correctly when I select the date but it doesn't register unless I do the above following.

    That is my problem that I don't want to undergo as this a project I'm working on to make things easier, more efficient, and smoother for team members at work in keeping track of the flow of orders.

    Does or better yet can anybody with the knowledge surrounding this, take a crack at it & figure out why this is going on and how to fix?

    1,000+ thanks in advance, this has been killing me!

    Timothy

    A2: =TODAY()

    F4: = Drop Down Calendar

    I've attached the file for overview as well.

    I'm working primarily in sheet3 before I copy the sheet to other locations.
    Attached Files Attached Files
    Last edited by Timothy873; 12-07-2013 at 07:23 PM.

  8. #8
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Date and Time Picker Control 6.0 (SP4) set to blank/ at todays date

    I feel like this thread is NOT appropriate to receive some assistance. I feel like this is a breach of Rule #2 of the Forum Rules. Please start your own thread for your own assistance.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Microsoft Date and Time Picker Control
    By intrigued94 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-24-2013, 12:07 PM
  2. Date and Time Picker Control 6.0 (SP6)
    By jj554 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-18-2013, 08:47 PM
  3. date and time picker control
    By Ashku in forum Excel General
    Replies: 0
    Last Post: 07-22-2006, 06:25 AM
  4. [SOLVED] microsoft date and time picker control
    By Don in forum Excel General
    Replies: 2
    Last Post: 05-20-2005, 10:06 AM
  5. [SOLVED] Date and Time Picker Control
    By Andy T in forum Excel General
    Replies: 0
    Last Post: 01-06-2005, 01:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1