+ Reply to Thread
Results 1 to 5 of 5

Macro Reformatting Text Input on InputBox

  1. #1
    Registered User
    Join Date
    02-10-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    26

    Macro Reformatting Text Input on InputBox

    Hi all,

    So I'm rather new to VBA and am currently spending some time learning a bit about it and attempting to apply it to to some workbooks.

    I've created a macro which displays a pop up where users enter a date, this date then gets pasted into a cell with feeds reports.

    When I run this and type the date in as DD/MM/YY it comes out as MM/DD/YY. I've changed the formatting of the cell and ensures it says DD/MM/YY.

    Please Login or Register  to view this content.
    Thanks in advance,

    Sam

    P.S. if you have any great learning resources/recommendations for VBA please share

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Macro Reformatting Text Input on InputBox

    In your Window's Control Panel, change your Region setting to English (United Kingdom). That will set your global date format for Excel and other programs to dd/mm/yyyy
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    02-10-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: Macro Reformatting Text Input on InputBox

    I checked that but it is already set to English (United Kingdom) at DD/MM/YY.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Macro Reformatting Text Input on InputBox

    Please Login or Register  to view this content.
    This will convert the text-date from the inputbox to a serial-date using your region setting.

  5. #5
    Registered User
    Join Date
    02-10-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: Macro Reformatting Text Input on InputBox

    That's done the trick, thank-you!

+ 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] MACRO: If user clicks cancel in inputbox,then do nothing. Problem with inputbox appearance
    By Tona in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-05-2015, 04:33 AM
  2. Modify Macro to use InputBox Input Rather than harcoded value
    By lesoies in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-29-2013, 12:32 AM
  3. Get input from user using application.inputbox. Input should be number and can be 0
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-11-2013, 11:28 AM
  4. [SOLVED] Inputbox to code for input text in cells.
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-07-2013, 12:24 PM
  5. InputBox to input data for each row
    By Shifcane in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-26-2011, 02:28 AM
  6. InputBox-ow to have a user input text in a inputbox
    By noodle48 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-24-2011, 08:17 AM
  7. Macro InputBox which will find text typed in sheet?
    By aiwnjoo in forum Excel Programming / VBA / Macros
    Replies: 40
    Last Post: 04-20-2010, 08:12 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