+ Reply to Thread
Results 1 to 6 of 6

Date format!

  1. #1
    Registered User
    Join Date
    06-27-2012
    Location
    Estonia
    MS-Off Ver
    Excel 2007
    Posts
    49

    Date format!

    I haveing a headic of Date value in one day it is dd.MM.yyyy with is requered and enother day it reverse day and month and look lile that MM.dd.yyyy

    I use userform and a calender control

    and code is like that!

    Please Login or Register  to view this content.
    while entering the code to the spread sheet then there is a code like that
    Please Login or Register  to view this content.

    If you have a good advice i'll be really thankfull!
    Last edited by alansidman; 03-05-2014 at 09:17 AM.

  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: Dade format!

    Use VBA Format() function like this...

    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
    06-27-2012
    Location
    Estonia
    MS-Off Ver
    Excel 2007
    Posts
    49

    Re: Dade format!

    OK ill try, but i think that the regional settings will messes it up!

  4. #4
    Registered User
    Join Date
    06-27-2012
    Location
    Estonia
    MS-Off Ver
    Excel 2007
    Posts
    49

    Re: Dade format!

    No its not Working!
    if the the date is dd.mm.yyyy then it change it to mm.dd.yyyy
    and if the date is mm.dd.yyyy then it change it to dd.mm.yyyy

    with is not secure that the format will all ways be the same format!

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Dade format!

    Hi,

    Maybe you are confusing what is actually in the text box. Are you sure that it is a date serial number rather than a string of text?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  6. #6
    Registered User
    Join Date
    06-27-2012
    Location
    Estonia
    MS-Off Ver
    Excel 2007
    Posts
    49

    Re: Dade format!

    The value of textbox is probably string because there is "numers" with "." the Calendar control value is defenetly Date value shown with different formats!
    I now placed code like that:

    Im not so sure that will secure that the date will remain like that!

    Please Login or Register  to view this content.
    and take away any other formatting in future!

    See if it works in longterm!

    I will follow it up some time!

+ 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. [SOLVED] Format painting formula to adjacent cell, and want the result to be in the original format
    By SF1eagles in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-03-2014, 10:49 AM
  2. Replies: 3
    Last Post: 05-15-2013, 12:16 AM
  3. Userform date format reverting back to us format on change event
    By jpruffle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-10-2009, 12:34 PM
  4. Replies: 1
    Last Post: 09-10-2005, 05:05 AM
  5. Replies: 1
    Last Post: 01-31-2005, 09:06 AM

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