+ Reply to Thread
Results 1 to 9 of 9

Default date in Userform Calendar

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    05-08-2009
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    223

    Default date in Userform Calendar

    In the attached file I have put together a userform that contains a drop down calendar in order for users to select relevant dates.

    I have two questions:

    1 - I've noticed that from creating the userform (04/01/10) the date has remained as this and not updated to the "current date". Is there any way this could be achieved?

    2 - Is there any way the code etc. could be manipulated to alter the dates in the Date Entry boxes, based on that entered into the "Rostered Start Date" box.
    I.e. If a user was to select 09/12/09 in the "Rostered Start Date" box, the other date boxes would automatically change to that date.

    Thanking you all kindly,

    Andy
    Attached Files Attached Files
    Last edited by AndyE; 01-05-2010 at 01:14 PM.

  2. #2
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: Default date in Userform Calendar

    One thing I noticed right away is that you use
    HTML Code: 
    for date and time.

    Do you know you can use the same DATE type and display this as time or date?

    Then your O/T calculation =((H4+I4)-(F4+G4))-((C4+D4)-(A4+B4)) would be easier.
    Last edited by rwgrietveld; 01-05-2010 at 10:29 AM.
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  3. #3
    Forum Contributor
    Join Date
    05-08-2009
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    223

    Smile Re: Default date in Userform Calendar

    Nope, I'm completely new to this so do not understand what you mean.

    Any improvements would be greatly appreciated though

  4. #4
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: Default date in Userform Calendar

    Andy,

    Can't work on it as some parts of your UserForm contains items that are not on my machine. Just installed XL 2010 which overrides my 2007 ( and I can't work on the Userform.

  5. #5
    Forum Contributor
    Join Date
    05-08-2009
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    223

    Re: Default date in Userform Calendar

    Not to worry....

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Default date in Userform Calendar

    I've added code to your userform
    Attached Files Attached Files
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  7. #7
    Forum Contributor
    Join Date
    05-08-2009
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    223

    Re: Default date in Userform Calendar

    Big thumbs up from me!!!!

    Thanks.

    Now I'll go away and figure out how it works.......

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Default date in Userform Calendar

    As you can see from Ricardo's problem,the DatePicker & Calendar Control can be problematical on some computers. Check out the alternatives here under DatePicker

    http://excel-it.com/vba_examples.htm

    There is code that can be adapted to use with the ones you are using

  9. #9
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Default date in Userform Calendar

    If you can't let me know

+ 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