Results 1 to 10 of 10

Merging MonthView & DTPicker Valuie into one cell

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Merging MonthView & DTPicker Valuie into one cell

    I have a user form on the attached example and on the form i have 'Month View' calendar control and 'Date/Time Picker'.

    I am trying to merge the valuses of both controls into one cell. I have tried doing this with the following code:

    Private Sub CommandButton1_Click()
        Range("B2") = Format(MonthView1.Value, "dd-mm-yyyy") & " " & DTPicker1.Value
        Unload Me
    End Sub
    When doing this though, the cell that the form puts the date/time into formats to mm-dd-yyyy. I don't understand why though as the cell is formated as dd-mm-yyy and i have also tried to add this into the code above but still displays mm-dd-yyyy.
    Attached Files Attached Files
    Last edited by adam2308; 09-01-2009 at 01:02 PM.

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