Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how to change Change Excel Format?

Posted on 2002-07-11
3
Medium Priority
?
952 Views
Last Modified: 2012-06-21
Hi How do I use VB to change Excel format from CSV to Excel Workbook with same filename?

I open it using Excel.Application
One way that work is that using SaveAs , and set file format to xlExcel9795, but the problem is that it will prompt a dialog "Do you want to overwrite it? Y/N/C".  I want it to automatic saved without display dialog, if file exist, just overwrite.

Or is there anyway to just change the fileformat of Excel CSV to Excel Workbook and saved.
0
Comment
Question by:AStronus
  • 3
3 Comments
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 800 total points
ID: 7147018
Use .displayalerts= false before save, save the file and then  reset to true from Excel.Application object.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7147020
Other possible way is check if file already exist, delete it and saveas normally.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7147048
Thanks for "A" grade.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses
Course of the Month10 days, 16 hours left to enroll

885 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