+ Reply to Thread
Results 1 to 3 of 3

VBA - Text Auto Converts to Date Format when using .csv

  1. #1
    Registered User
    Join Date
    02-25-2015
    Location
    Birmingham, England
    MS-Off Ver
    MS Office 2010
    Posts
    29

    VBA - Text Auto Converts to Date Format when using .csv

    Hi,

    I have a really annoying problem that I can't find a solution to anywhere on the net.

    I have a macro within an .xlsx file that opens a .csv file from a shared drive file location, and then enters the month in the format MMMYY which has been inputted by the user and is also formatted as Text in the .xlsx file.

    When I step through the macro, it puts the text in the correct format on the .csv file but once the .csv is closed and reopened, the format has automatically converted to a DD/MM/YYYY format.

    Please see below my code.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: VBA - Text Auto Converts to Date Format when using .csv

    Try changing

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    02-25-2015
    Location
    Birmingham, England
    MS-Off Ver
    MS Office 2010
    Posts
    29

    Re: VBA - Text Auto Converts to Date Format when using .csv

    Thanks for the reply but this still doesn't work.

+ 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. Replies: 3
    Last Post: 04-01-2014, 07:40 PM
  2. [SOLVED] VBA help needed to auto format date column and remove "A" text
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-21-2014, 10:46 PM
  3. Help excel auto converts
    By m_789 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-14-2013, 06:18 AM
  4. Array converts text into date
    By sungsam in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-27-2011, 10:57 AM
  5. auto row format general/date to text. Is there a function?
    By Mitul in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-20-2010, 12:28 AM
  6. String converts to date - text doesn't help!
    By KathyC in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-08-2006, 10:48 AM
  7. [SOLVED] Excel file from IE auto converts to PDF
    By Cary K in forum Excel General
    Replies: 1
    Last Post: 08-15-2006, 12:45 PM

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