+ Reply to Thread
Results 1 to 2 of 2

Setting MinDate field of DTPicker2 = Date Entered in DTPicker1

  1. #1
    Registered User
    Join Date
    07-10-2012
    Location
    Thane, India
    MS-Off Ver
    Excel 2010
    Posts
    13

    Setting MinDate field of DTPicker2 = Date Entered in DTPicker1

    hi,
    i am total newbie in developing vba from excel entries...

    my application needs 2 date fields so that i can calculate the No. of Days between the 2 dates

    i have 2 DTPickers..

    till now i have managed to get the entry of DTPickers into my excel cells..

    but to perform a validation so that my DTPicker2 doesnot preceed DTPicker1 (datewise)
    i need to set the MinDate for DTPicker2 equal to the date entered in DTPicker 1


    Please Login or Register  to view this content.
    this is the code of my program till now.. i am using the Subtract function from excel to calculate the difference

    kindly let me know what i can do..

  2. #2
    Registered User
    Join Date
    07-10-2012
    Location
    Thane, India
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Setting MinDate field of DTPicker2 = Date Entered in DTPicker1

    hi guys.. i found the solution myself.. :D

    Please Login or Register  to view this content.
    here you can see that i am taking the values entered into the DTPicker 1 to a cell location in my excel sheet3..
    i compare it with an arbitrary date value (which i know cant be used by my form user)
    this <> (not equal) condition therefore will always be true..

    because of this true condition i can now execute the 2 statements in my if clause (i.e. enabling my DTPicker2 and setting it to my date value in DTPicker1)

    i m gettin good at this.. :D

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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