VBA Macro to create Tab Delimited CSV file

XcelNoobster

New Member
Joined
Jun 7, 2022
Messages
40
So I have a VBA Macro that formats a sheets that contain Column A, B and C. Is it possible to create a macro that adds a TAB separating the Columns so when I save it as a CSV, I get a Tab Delimited CSV file instead of a comma?
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Tab-delimited and CSV files are two different things entirely. CSV actually stands for "Comma Separated Value".
So a tab-delimited files save with a tab as the delimiter. A CSV file saves with a comma as the delimiter.

However, you should be able to get the VBA you want pretty easily.
Just turn on your Macro Recorder and record yourself saving the file as the "Text (Tab Delimited) (*.txt)" file type, and you will have the VBA code you need to do this.
You can give the file any name/extenstion you desire.
 
Upvote 0

Forum statistics

Threads
1,214,942
Messages
6,122,366
Members
449,080
Latest member
Armadillos

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