Results 1 to 8 of 8

I want to pop up a MsgBox if if user enters date like 2015.04.30 instead of 30.04.2015.

Threaded View

  1. #1
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,014

    I want to pop up a MsgBox if if user enters date like 2015.04.30 instead of 30.04.2015.

    Dear experts,
    Following code redirects user to enter date as intended format.
    I want to pop up a MsgBox if user enters date like 2015.04.30 instead of 30.04.2015.
    Any idea?
    Sub Macro1()
    Dim x
    x = Application.InputBox(Prompt:="Please enter the date... Intended Format: 30.04.2015", Title:="Hello", Default:="30.04.2015", Type:=2)
    MsgBox "Wrong format"
    End Sub
    Thanks in advance.

    Useful link:
    https://msdn.microsoft.com/en-us/lib.../ff839468.aspx
    Last edited by HerryMarkowitz; 09-08-2015 at 06:20 AM.
    Sub DontForgetThese()
         If Your thread includes any code Then Please use code tags...
         If Your thread has been solved Then Please mark as solved...
         If Anybody has helped to you Then Please add reputation...
    End Sub

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] need corrected data format of date & time like " 04-Jul-2015 23:52:41 020
    By arunjyoti.ec in forum Excel General
    Replies: 1
    Last Post: 07-26-2015, 03:42 AM
  2. [SOLVED] Change From 1 January 2015 Thursday to 1 January 2015 Thu
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-14-2015, 11:47 AM
  3. Replies: 4
    Last Post: 07-06-2015, 08:39 AM
  4. New User 06/30/2015 -
    By ehdz0222 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 06-30-2015, 10:50 AM
  5. Want VBA Code to return funding depletion date in the Form 6/1/2015
    By Briandc72 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-25-2015, 12:56 PM
  6. [SOLVED] How many Mondays, Tuesdays, etc. in 2015 to date?
    By OverKnight in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-20-2015, 01:53 PM
  7. Replies: 6
    Last Post: 04-20-2015, 09:40 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