Reformat excel file from VB6 Program

Look, I don't even know if this is possible but I really need to be able to have a VB6 program somehow take an excel file and save it as a csv(comma delimited file).  I have a very simple form with a file dialog that populates a textbox with the filename, including the path, and an execute button.  I need for the user to be able to select the file in the file dialog and then press the execute button and have the file saved as a csv.  It can give the new file the same name every time.  There is almost certainly a way to do this, even if it means going around the world to accomplish it.  My users need a very simple approach or it won't get done.

Who is Participating?
ChenChenConnect With a Mentor Commented:

If you just want to open an existing excel file and save it to  csv format, try this:

'add excel object into your project references

dim xlapp
dim xlwbk as workbook

set xlapp=createobject("excel.application")
xslwbk.saveas CSV_FILE, FileFormat:=xlCSV, CreateBackup:=False

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.