Problem saving in Tab-delimited format in Excel 2010

Hagoa

New Member
Joined
Mar 22, 2016
Messages
4
Hi,

I created a simple macro that saves a specific sheet as a tab-delimited txt.file.
I first created it in Excel 2013 and it worked fine.

When I draged it into Excel 2010 one of the columns receives another format when converted into txt.
In excel it look like this:

deal_dt
21/03/2016
21/03/2016
21/03/2016
21/03/2016

<tbody>
</tbody>


But when saved as tab-delimited .txt the result is:

deal_dt
3/21/2016
3/21/2016
3/21/2016
3/21/2016

<tbody>
</tbody>



Code:

Code:
Application.DisplayAlerts = False
    Application.ScreenUpdating = False
     
    Windows("myfile.xlsm").Activate
    Sheets("Output").Select
    Sheets("Output").Copy
               
    ActiveSheet.SaveAs Filename:= _
        "myfile.txt", FileFormat:= _
        xlTextWindows, CreateBackup:=False


    ActiveWorkbook.Close
Code:


Any idea why it differ between Excel 2010 and 2013 and do you have any ideas how to solve it?

Best regards,
Gustav
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Excel will save the data exactly how you see it. You can verify this by opening the file in Notepad. When you open the text file in Excel you need to choose the Date format DMY at Step 3 of the Wizard.
 
Upvote 0

Forum statistics

Threads
1,213,527
Messages
6,114,148
Members
448,552
Latest member
WORKINGWITHNOLEADER

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top