+ Reply to Thread
Results 1 to 3 of 3

Using a Dtpicker to select dates

  1. #1
    Registered User
    Join Date
    07-23-2015
    Location
    South Africa
    MS-Off Ver
    Office 2013
    Posts
    2

    Using a Dtpicker to select dates

    Hi there

    I am using a dtpicker in a spreadsheet which is to be used as a timesheet. The dtpicker is being used to aid user day selection and to ensure the date cell is populated with a date in a text format e.g. '2015/07/01 as this data is exported to a csv file to be imported into another system.

    The correct date cell is selected and then the dtpicker is used to select a date which then populates the active cell (see code below)
    Private Sub DTPicker21_Change()
    ActiveCell.Value = "'" & Format(Me.DTPicker21.Value, "yyyy/MM/dd")
    End Sub

    The one issue is this only works when the date in the dtpicker is changed - so if 2 consecutive date cells are to have the same date the second cell is not populated unless the user changes the date and changes it back.

    Any suggestions around this?

    I hope this makes sense.

    Thanks
    Graham

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Using a Dtpicker to select dates

    Replace

    Please Login or Register  to view this content.
    To

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    07-23-2015
    Location
    South Africa
    MS-Off Ver
    Office 2013
    Posts
    2

    Re: Using a Dtpicker to select dates

    Hi Sixthsense

    Sorry this does not change anything - same result

+ 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. Select Multiple Dates In Report Filter Pivot Table But Dates Are Not Static
    By biasedobserver in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-06-2014, 03:38 PM
  2. Replies: 0
    Last Post: 05-18-2013, 03:29 AM
  3. use DTPicker to select date and populate combobox
    By smartphreak in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-02-2011, 03:18 AM
  4. Select date value when Dtpicker load
    By nguyennb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-18-2009, 11:51 PM
  5. Lookup Range of Dates from DTPicker and write to spreadheet
    By SteveG in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-05-2009, 02:14 PM
  6. Replies: 2
    Last Post: 12-09-2008, 12:44 AM
  7. DTPicker
    By Syed Haider Ali in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-11-2006, 03:38 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