+ Reply to Thread
Results 1 to 7 of 7

Desperation is Setting in - Date Formats! :-(

  1. #1
    Zani
    Guest

    Desperation is Setting in - Date Formats! :-(

    I have a series of UserForms capturing and writing data to an worksheet,
    trouble is no matter how I format anything cannot get the format of a date
    entered in the UserForm to match the worksheet formats. ie When I enter
    05/02/06 (5th Feb 06)on the UserForm it is transposed to 02/05/06 (2nd May
    06) on the worksheet!

    Am I going nuts or is there a way to get around this - it's seriously
    knocking my plug in now!

    --
    Zani
    (if I have posted here, I really am stuck!)


  2. #2
    Yngve
    Guest

    Re: Desperation is Setting in - Date Formats! :-(

    Hi Zani

    You have to set right format on cells

    Regads Yngve


  3. #3
    Zani
    Guest

    Re: Desperation is Setting in - Date Formats! :-(

    Hi, no that's not it. the cell formats are OK, it is something weird to do
    with VB being in US format, and I am working in UK format - am so confused!!!!
    --
    Zani
    (if I have posted here, I really am stuck!)



    "Yngve" wrote:

    > Hi Zani
    >
    > You have to set right format on cells
    >
    > Regads Yngve
    >
    >


  4. #4
    Norman Jones
    Guest

    Re: Desperation is Setting in - Date Formats! :-(

    Hi Zani,

    Try:

    Range("A1").Value = CDate(Me.TextBox1.Value)

    ---
    Regards,
    Norman



    "Zani" <Zani@discussions.microsoft.com> wrote in message
    news:37FE7731-BE4A-43BB-B643-65B86D0C6853@microsoft.com...
    >I have a series of UserForms capturing and writing data to an worksheet,
    > trouble is no matter how I format anything cannot get the format of a date
    > entered in the UserForm to match the worksheet formats. ie When I enter
    > 05/02/06 (5th Feb 06)on the UserForm it is transposed to 02/05/06 (2nd May
    > 06) on the worksheet!
    >
    > Am I going nuts or is there a way to get around this - it's seriously
    > knocking my plug in now!
    >
    > --
    > Zani
    > (if I have posted here, I really am stuck!)
    >




  5. #5
    Yngve
    Guest

    Re: Desperation is Setting in - Date Formats! :-(

    Hi Zani

    TextBox1.Value = Format(TextBox1.Value, "dd-mmm-yyyy")

    Regards Yngve


  6. #6
    Toppers
    Guest

    Re: Desperation is Setting in - Date Formats! :-(

    Zani,

    For a previous posting (thanks to Tom Ogilvy):

    Private Sub textbox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
    Range("a1") = CDate(TextBox1.Text)
    Range("a1").NumberFormat = "dd/mm/yy"
    End Sub

    I am UK-Based and share your frustration.

    HTH

    End Sub"Zani" wrote:

    > Hi, no that's not it. the cell formats are OK, it is something weird to do
    > with VB being in US format, and I am working in UK format - am so confused!!!!
    > --
    > Zani
    > (if I have posted here, I really am stuck!)
    >
    >
    >
    > "Yngve" wrote:
    >
    > > Hi Zani
    > >
    > > You have to set right format on cells
    > >
    > > Regads Yngve
    > >
    > >


  7. #7
    Zani
    Guest

    Re: Desperation is Setting in - Date Formats! :-(

    Thanks chaps - your posts came just in time to stop me throwing myself off
    the roof - I thought I was going nuts! One to remember for the future me
    thinks.

    Thanks again - only hope I will be knowledgeable enough one day to help
    people in return.
    --
    Zani
    (if I have posted here, I really am stuck!)



    "Norman Jones" wrote:

    > Hi Zani,
    >
    > Try:
    >
    > Range("A1").Value = CDate(Me.TextBox1.Value)
    >
    > ---
    > Regards,
    > Norman
    >
    >
    >
    > "Zani" <Zani@discussions.microsoft.com> wrote in message
    > news:37FE7731-BE4A-43BB-B643-65B86D0C6853@microsoft.com...
    > >I have a series of UserForms capturing and writing data to an worksheet,
    > > trouble is no matter how I format anything cannot get the format of a date
    > > entered in the UserForm to match the worksheet formats. ie When I enter
    > > 05/02/06 (5th Feb 06)on the UserForm it is transposed to 02/05/06 (2nd May
    > > 06) on the worksheet!
    > >
    > > Am I going nuts or is there a way to get around this - it's seriously
    > > knocking my plug in now!
    > >
    > > --
    > > Zani
    > > (if I have posted here, I really am stuck!)
    > >

    >
    >
    >


+ 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