VBA code to convert .csv to .txt

CamBF

New Member
Joined
Oct 19, 2023
Messages
20
Office Version
  1. 2016
Hi guys,

Need urgent help please. We require a VBA code that can be assigned to a macro button that does the following:

1. When pressed brings up a dialog window to select a folder containing all .csv files
2. Code goes through entire folder and converts all .csv files to .txt files
3. Code creates a folder in .csv file location named ".csv files" and moves all .csv files into this folder

Thanks
 
Hi,

Also need to have the code search each .csv file as it converts it to a .txt file and replace all ";" within the .csv files to ",".

Thanks
 
Upvote 0

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