Consulting

Results 1 to 2 of 2

Thread: Inputbox with date used as European style

  1. #1

    Inputbox with date used as European style

    ***** SOLVED *****

    Hi to you all.

    I have a (maybe) simple question but can;t find the answer anywhere.

    I have the following code :

    DatumOfPayment = InputBox("Wat is de date of payment ? (dd-mm-yyyy)")
    MsgBox (DatumOfPayment & "is being noted")
    ActiveCell.Offset(0, -3).Select
    ActiveCell.FormulaR1C1 = DatumOfPayment
    The problem is that in the selected cell the date has to be entered as European style date (dd-mm-yyyy) and not in Us style date (mm-dd-yyyy)

    What can be the solution so that my entered date will be shown in the selected cell as European date ?

    Thanks in advance for your help.

  2. #2
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    Use CDate() on DatumOfPayment. If the numberformat is not set, that can always be set by macro as well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •