Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Reformat excel file from VB6 Program

Posted on 2004-10-27
Medium Priority
Last Modified: 2010-05-02
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.

Question by:BLWedge
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 48

Accepted Solution

Mikal613 earned 1000 total points
ID: 12428481

Assisted Solution

ChenChen earned 1000 total points
ID: 12430514

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")
set xlwbk=xlapp.workbooks.open(EXCEL_FILE)
xslwbk.saveas CSV_FILE, FileFormat:=xlCSV, CreateBackup:=False


Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question