+ Reply to Thread
Results 1 to 9 of 9

Date Picker in UserForm will not add value to specified cell

  1. #1
    Registered User
    Join Date
    06-28-2013
    Location
    London, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    69

    Date Picker in UserForm will not add value to specified cell

    Hi all,

    Having a problem with the DatePicker button in my UserForm. I am trying to have the date selected in the DatePicker button fill a specified cell. I basically want to be able to add projects and assign dates to these projects. I then want to build a program that uses the due dates for the projects and compares them to the system date. If they are within a given range from the system date the cells will be formatted (using conditional formatting). I will then have another application to take all date cells with this formatting and add them to a calendar, email alert or Gantt Chart.

    For now I need to set up the DatePicker or determine if there is a better way to enter dates in my userform.


    When I press the 'OK' button the following code executes. My DatePicker is called 'DatePickerCreated'.
    Please Login or Register  to view this content.

    The error I am getting is "Object doesn't support this property or method"


    Any help with this would be greatly appreciated!

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Date Picker in UserForm will not add value to specified cell

    Where do you get the error?
    If posting code please use code tags, see here.

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Date Picker in UserForm will not add value to specified cell

    Hello clapforthewolfman,

    Welcome to the Forum!
    If your operating system is 64 bit Windows then there is no Date Picker control available. You can check by pressing the Windows key and then Pause/Break key. This will display information about your system.

    There are workarounds. I have a UserForm that will work as a Date Picker. I can install the it for you if you post your workbook.

    To Post Your Workbook
    1. At the bottom right of the Reply window, Click the button Go Advanced
    2. At the top of the Your Message Window, in the first row of icons, Click the Paperclip icon.
    3. Click the Add Files button at the top right in the dialog box. This displays the File Manager dialog.
    4. Click the Select Files button at the bottom middle of the dialog.
    5. In the new window Find the file you want to upload, select it, and Click Open.
    6. You will now be back in the File Manager dialog. Click the bottom Middle button Upload File.
    7. Wait until the file has completely uploaded before you exit the File Manager dialog.

    File Manger Picture
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Registered User
    Join Date
    06-28-2013
    Location
    London, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: Date Picker in UserForm will not add value to specified cell

    Quote Originally Posted by Norie View Post
    Where do you get the error?
    This line is where the error occurs

    .Offset(RowCount, 8).Value = Me.DatePickerCreated.Value

  5. #5
    Registered User
    Join Date
    06-28-2013
    Location
    London, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: Date Picker in UserForm will not add value to specified cell

    Quote Originally Posted by Leith Ross View Post
    Hello clapforthewolfman,

    Welcome to the Forum!
    If your operating system is 64 bit Windows then there is no Date Picker control available. You can check by pressing the Windows key and then Pause/Break key. This will display information about your system.

    There are workarounds. I have a UserForm that will work as a Date Picker. I can install the it for you if you post your workbook.

    To Post Your Workbook
    1. At the bottom right of the Reply window, Click the button Go Advanced
    2. At the top of the Your Message Window, in the first row of icons, Click the Paperclip icon.
    3. Click the Add Files button at the top right in the dialog box. This displays the File Manager dialog.
    4. Click the Select Files button at the bottom middle of the dialog.
    5. In the new window Find the file you want to upload, select it, and Click Open.
    6. You will now be back in the File Manager dialog. Click the bottom Middle button Upload File.
    7. Wait until the file has completely uploaded before you exit the File Manager dialog.

    File Manger Picture
    Appears to be a 32-Bit system. It's not one that I normally work on as I generally use Excel for Mac.

    I guess my real question is will I be able to make programs that compare a cells date to the system date (current date) and execute actions.

    Before trying the DatePicker I was using a simple text box with the following code:

    Please Login or Register  to view this content.
    Thanks!

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Date Picker in UserForm will not add value to specified cell

    Hello clapforthewolfman,

    Sorry to say, I ma not a Mac user and do not know what the differences between the Mac and PC Office versions are. In a PC environment, I don't see any problem with the code. The Value property is common to just about all PC controls. Hard to imagine that a Mac control would not have this property as well.

    It may be the use to the Me keyword. Here, Me refers back to the UserForm. If the Date Picker control is part of the UserForm's control's then it seems unlikely this would be the problem.

    The only other problem I can see might be the control is not a normal part of the UserForm's controls. Perhaps, it is an additional control that was added without being properly registered with the system. Without being able to examine your system, I am just guessing.

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Date Picker in UserForm will not add value to specified cell

    If the date picker isn't working then use a textbox.

    Remember to convert the 'text' date from the textbox to a 'real' date when you transfer it to the worksheet or when trying to do any comparisons/calculations.

    You can do that with CDate or DateValue.

  8. #8
    Registered User
    Join Date
    06-28-2013
    Location
    London, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: Date Picker in UserForm will not add value to specified cell

    Thanks Leith,

    I imagine it would be the latter. I am probably just going to go ahead and use the second code posted and just format the columns where that data is generated to 'Short Date'.

  9. #9
    Registered User
    Join Date
    06-28-2013
    Location
    London, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: Date Picker in UserForm will not add value to specified cell

    Thanks Norie for the help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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